raulmur / ORB_SLAM2

Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities
Other
9.17k stars 4.69k forks source link

> I had a similar problem and added #1030

Closed BorisWang-1219 closed 2 years ago

BorisWang-1219 commented 2 years ago

I had a similar problem and added

#include<unistd.h>

into include/System.h before running

./build.sh

in _ORBSLAM2/.

As System.h is probably one of the first files to be called, adding the code will apply its modifications to all the other headers called within/after it.

If you still have this problem, add the include to all the .cc files mentioned in

CMakeFiles/<filedir/filename>make:159: recipe for target '<filedir/filename.cc>`

-like lines and retry

rm -rf build && ./build.sh

until you have no more files do modify !

thank you for you help! I have already added and I found that my Pangolin version is the latest version that maybe have some bug or mistake. So i change Pangolin to the old version and succeed "build.sh" . Thank you again!

_Originally posted by @yingxinli in https://github.com/raulmur/ORB_SLAM2/issues/1018#issuecomment-927203655_