CMake错误:include找不到加载文件
我正试图在项目中安装并使用库“ifopt”,但出现了一些错误 我使用了以下命令 (像这里:): 然后我在我的CMakeLists中添加了:CMake错误:include找不到加载文件,cmake,ros,catkin,Cmake,Ros,Catkin,我正试图在项目中安装并使用库“ifopt”,但出现了一些错误 我使用了以下命令 (像这里:): 然后我在我的CMakeLists中添加了: find_package(ifopt) add_executable(testifopt src/testifopt.cpp) target_link_libraries(testifopt PUBLIC ifopt::ifopt_ipopt) 这就是我用柳絮做的: CMake Error at /home/simone/ifopt/ifopt-conf
find_package(ifopt)
add_executable(testifopt src/testifopt.cpp)
target_link_libraries(testifopt PUBLIC ifopt::ifopt_ipopt)
这就是我用柳絮做的:
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")
解决了,
我需要更新Ros,重新安装IfOpt,还向CMakeLists添加了以下内容:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_MATH_DISABLE_FLOAT128")
这就是我在做什么时得到的
?是什么导致了你发布的消息?这些都是您看到的消息吗?为ifopt
配置cmake时,缺少的文件ifopt\u core-targets.cmake
和其他类似文件应由cmake自动生成。能否确认这些文件存在于/home/simone/ifopt
中?@squarekittles是的,文件存在于/home/simone/ifopt/build/ifopt_core/cmakfiles/Export/share/ifopt中的文件夹中/cmake@KamilCuk我试图使用命令:“柳絮制作”要构建我的项目,也许你应该添加catkin
和ros
标签,这就是我在做什么时得到的?是什么导致了你发布的消息?这些都是您看到的消息吗?为ifopt
配置cmake时,缺少的文件ifopt\u core-targets.cmake
和其他类似文件应由cmake自动生成。能否确认这些文件存在于/home/simone/ifopt
中?@squarekittles是的,文件存在于/home/simone/ifopt/build/ifopt_core/cmakfiles/Export/share/ifopt中的文件夹中/cmake@KamilCuk我试图使用命令:“catkin_make”来构建我的项目,也许你应该添加catkin
和ros
标签