CMake Error: include could not find load file
CMake Error: include could not find load file
我正在尝试在项目中安装和使用库 "ifopt",但我遇到了一些错误
我使用过以下命令
(像这里:https://github.com/ethz-adrl/ifopt/blob/master/README.md):
sudo apt-get install cmake libeigen3-dev coinor-libipopt-dev
git clone https://github.com/ethz-adrl/ifopt.git
cd ifopt
mkdir build
cd build
cmake ..
make
sudo make install
然后我添加到我的 CMakeLists:
find_package(ifopt)
add_executable(testifopt src/testifopt.cpp)
target_link_libraries(testifopt PUBLIC ifopt::ifopt_ipopt)
这就是我得到的,使用 catkin_make:
CMake Error at /home/simone/ifopt/ifopt-config.cmake:40 (include): include could not find load file: /home/simone/ifopt/ifopt_core-targets.cmake
Call Stack (most recent call first): push_optimal_planner/CMakeLists.txt:30 (find_package)
CMake Warning (dev) at /home/simone/ifopt/ifopt-config.cmake:44 (get_target_property):
Policy CMP0045 is not set: Error on non-existent target in
get_target_property. Run "cmake --help-policy CMP0045" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
get_target_property() called with non-existent target "ifopt::ifopt_core".
Call Stack (most recent call first): push_optimal_planner/CMakeLists.txt:30 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at /home/simone/ifopt/ifopt-config.cmake:47 (get_property): get_property could not find TARGET ifopt::ifopt_core. Perhaps it has not yet been created.
Call Stack (most recent call first): push_optimal_planner/CMakeLists.txt:30 (find_package)
怎么了?
感谢您的帮助。
已解决,
我需要更新 Ros,重新安装 IfOpt 并且我还向 CMakeLists 添加了这一行:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_MATH_DISABLE_FLOAT128")
我正在尝试在项目中安装和使用库 "ifopt",但我遇到了一些错误
我使用过以下命令 (像这里:https://github.com/ethz-adrl/ifopt/blob/master/README.md):
sudo apt-get install cmake libeigen3-dev coinor-libipopt-dev
git clone https://github.com/ethz-adrl/ifopt.git
cd ifopt
mkdir build
cd build
cmake ..
make
sudo make install
然后我添加到我的 CMakeLists:
find_package(ifopt)
add_executable(testifopt src/testifopt.cpp)
target_link_libraries(testifopt PUBLIC ifopt::ifopt_ipopt)
这就是我得到的,使用 catkin_make:
CMake Error at /home/simone/ifopt/ifopt-config.cmake:40 (include): include could not find load file: /home/simone/ifopt/ifopt_core-targets.cmake
Call Stack (most recent call first): push_optimal_planner/CMakeLists.txt:30 (find_package)
CMake Warning (dev) at /home/simone/ifopt/ifopt-config.cmake:44 (get_target_property):
Policy CMP0045 is not set: Error on non-existent target in
get_target_property. Run "cmake --help-policy CMP0045" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
get_target_property() called with non-existent target "ifopt::ifopt_core".
Call Stack (most recent call first): push_optimal_planner/CMakeLists.txt:30 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at /home/simone/ifopt/ifopt-config.cmake:47 (get_property): get_property could not find TARGET ifopt::ifopt_core. Perhaps it has not yet been created.
Call Stack (most recent call first): push_optimal_planner/CMakeLists.txt:30 (find_package)
怎么了? 感谢您的帮助。
已解决,
我需要更新 Ros,重新安装 IfOpt 并且我还向 CMakeLists 添加了这一行:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_MATH_DISABLE_FLOAT128")