|
发表于 2021-12-3 16:54:42
6123 浏览 2 回复
./compile_planning.sh 编译问题 缺少文件 #include <nlopt.hpp>
./compile_planning.sh 编译的时候,提示如下的错误:
make[2]: *** Waiting for unfinished jobs....
[ 83%] Building CXX object FastPlanner/bspline_opt/CMakeFiles/bspline_opt.dir/src/bspline_optimizer.cpp.o
[ 86%] Built target path_searching
/home/amov/Prometheus/Modules/planning/FastPlanner/bspline_opt/src/bspline_optimizer.cpp:2:10: fatal error: nlopt.hpp: No such file or directory
#include <nlopt.hpp>
^~~~~~~~~~~
compilation terminated.
FastPlanner/bspline_opt/CMakeFiles/bspline_opt.dir/build.make:62: recipe for target 'FastPlanner/bspline_opt/CMakeFiles/bspline_opt.dir/src/bspline_optimizer.cpp.o' failed
make[2]: *** [FastPlanner/bspline_opt/CMakeFiles/bspline_opt.dir/src/bspline_optimizer.cpp.o] Error 1
CMakeFiles/Makefile2:4382: recipe for target 'FastPlanner/bspline_opt/CMakeFiles/bspline_opt.dir/all' failed
make[1]: *** [FastPlanner/bspline_opt/CMakeFiles/bspline_opt.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j6 -l6" failed
Loren已获得悬赏 3 阿木币最佳答案
分析问题: fatal error: nlopt.hpp: No such file or directory
这个报错是: nlopt.hpp 这个头文件不存在。
解决问题: 安装这个头文件的库就可以了
sudo apt install libnlopt-dev
同理,在以后如果遇见类似的错 ...
|
扫一扫浏览分享
|
|
|
|
|
|
|
发表于 2021-12-3 17:25:35
分析问题: fatal error: nlopt.hpp: No such file or directory
这个报错是: nlopt.hpp 这个头文件不存在。
解决问题: 安装这个头文件的库就可以了
sudo apt install libnlopt-dev
同理,在以后如果遇见类似的错误,都可以通过这个方式来进行安装库文件。
sudo apt install libxxx-dev
其中,lib这个前缀,表示库,xxx表示你要安装的那个那个库的名称,-dev表示安装的版本是 development |
|
|
|
|
|
|
|
发表于 2021-12-3 17:13:36
sudo apt-get install libnlopt-dev
|
|
|
|
|
|
|
|