编译orb_slam2

安装opencv3.4

cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..

安装 Eigen3.38
安装 Pangolin c++11版本

用c++11编译orb_slam2

cmake -DCMAKE_CXX_STANDARD=11 -DCMAKE_BUILD_TYPE=Release ..

或者set(CMAKE_CXX_STANDARD 11)
如果报错compile error:usleep was not declared in this scope
在System.h中加入#include <unistd.h>

在运行过程中报错

The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support.
解决方法是先卸载opencv,安装上述依赖再重装opencv

猜你喜欢

转载自blog.csdn.net/weixin_39849839/article/details/121123148