Report an error and solving method
This error may occur on Ubuntu 20.04 and 18.04.
When running ./build.sh, I got
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:76: CMakeFiles/ORB_SLAM3.dir/src/Tracking.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:711: CMakeFiles/ORB_SLAM3.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
The problem can be solved by add add_compile_options(-std=c++14) before CMakeLists.txt file.
Then it build successfully.
Same solving method for the error:
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:375:CMakeFiles/ORB_SLAM3.dir/src/MLPnPsolver.cpp.o] Error 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:76:CMakeFiles/ORB_SLAM3.dir/src/Tracking.cc.o] Error 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:245:CMakeFiles/ORB_SLAM3.dir/src/Frame.cc.o] Error 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:102:CMakeFiles/ORB_SLAM3.dir/src/LoopClosing.cc.o] Error 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:323:CMakeFiles/ORB_SLAM3.dir/src/G2oTypes.cc.o] Error 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:232:CMakeFiles/ORB_SLAM3.dir/src/Optimizer.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:390:CMakeFiles/ORB_SLAM3.dir/all] Error 2
make: *** [Makefile:84:all] Error 2
Worked for me.
Solved other issue during /build.sh of g2o and Sophus.
Thank you.
Where exactly should i paste add_compile_options(-std=c++14) in order to make it work?
Where exactly should i paste add_compile_options(-std=c++14) in order to make it work?
At the first line of CMakeLists.txt file.
Worked for me too, Thanks :)
Worked for me, thanks.
Anyone getting this error?
make[1]: *** [CMakeFiles/Makefile2:148: CMakeFiles/ORB_SLAM3.dir/all] Error 2 make: *** [Makefile:91: all] Error 2
Anyone getting this error?
make[1]: *** [CMakeFiles/Makefile2:148: CMakeFiles/ORB_SLAM3.dir/all] Error 2 make: *** [Makefile:91: all] Error 2
I have found the same problem with my computer, have you solved this?
Anyone getting this error? make[1]: *** [CMakeFiles/Makefile2:148: CMakeFiles/ORB_SLAM3.dir/all] Error 2 make: *** [Makefile:91: all] Error 2
I have found the same problem with my computer, have you solved this?
Yes, I changed some settings to C++ 14 I think. It's been a while. I forgot lol