Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix many errors: ‘usleep’ was not declared #932

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix many errors: ‘usleep’ was not declared #932

wants to merge 1 commit into from

Conversation

booiljung
Copy link

@booiljung booiljung commented Aug 17, 2020

There are many compile time errors. This PR fixes these errors.

/home/booil/linspace/orbslam/ORB_SLAM2/src/LoopClosing.cc: In member function ‘void ORB_SLAM2::LoopClosing::Run()’:
/home/booil/linspace/orbslam/ORB_SLAM2/src/LoopClosing.cc:84:9: error: ‘usleep’ was not declared in this scope
         usleep(5000);
         ^~~~~~
/home/booil/linspace/orbslam/ORB_SLAM2/src/LoopClosing.cc:84:9: note: suggested alternative: ‘fseek’
         usleep(5000);
         ^~~~~~
         fseek
/home/booil/linspace/orbslam/ORB_SLAM2/src/LoopClosing.cc: In member function ‘void ORB_SLAM2::LoopClosing::CorrectLoop()’:
/home/booil/linspace/orbslam/ORB_SLAM2/src/LoopClosing.cc:416:20: warning: use of an operand of type ‘bool’ in ‘operator++’ is deprecated [-Wdeprecated]
         mnFullBAIdx++;
                    ^~
/home/booil/linspace/orbslam/ORB_SLAM2/src/LoopClosing.cc:428:9: error: ‘usleep’ was not declared in this scope
         usleep(1000);
         ^~~~~~
/home/booil/linspace/orbslam/ORB_SLAM2/src/LoopClosing.cc:428:9: note: suggested alternative: ‘fseek’
         usleep(1000);
         ^~~~~~
         fseek
/home/booil/linspace/orbslam/ORB_SLAM2/src/LoopClosing.cc: In member function ‘void ORB_SLAM2::LoopClosing::RequestReset()’:
/home/booil/linspace/orbslam/ORB_SLAM2/src/LoopClosing.cc:630:9: error: ‘usleep’ was not declared in this scope
         usleep(5000);
         ^~~~~~
/home/booil/linspace/orbslam/ORB_SLAM2/src/LoopClosing.cc:630:9: note: suggested alternative: ‘fseek’
         usleep(5000);
         ^~~~~~
         fseek
/home/booil/linspace/orbslam/ORB_SLAM2/src/LoopClosing.cc: In member function ‘void ORB_SLAM2::LoopClosing::RunGlobalBundleAdjustment(long unsigned int)’:
/home/booil/linspace/orbslam/ORB_SLAM2/src/LoopClosing.cc:670:17: error: ‘usleep’ was not declared in this scope
                 usleep(1000);
                 ^~~~~~
/home/booil/linspace/orbslam/ORB_SLAM2/src/LoopClosing.cc:670:17: note: suggested alternative: ‘fseek’
                 usleep(1000);
                 ^~~~~~
                 fseek
/home/booil/linspace/orbslam/ORB_SLAM2/src/Tracking.cc: In member function ‘void ORB_SLAM2::Tracking::Reset()’:
/home/booil/linspace/orbslam/ORB_SLAM2/src/Tracking.cc:1512:13: error: ‘usleep’ was not declared in this scope
             usleep(3000);
             ^~~~~~
/home/booil/linspace/orbslam/ORB_SLAM2/src/Tracking.cc:1512:13: note: suggested alternative: ‘fseek’
             usleep(3000);
             ^~~~~~
             fseek

@linuxsen
Copy link

linuxsen commented Jan 3, 2021

add #include <unistd.h>
#include <stdio.h>
#include <stdlib.h> in "system.h"

@dcaffo98
Copy link

Same problem on Ubuntu 18.04 and @linuxsen 's fix worked for me! ( "System.h", not "system.h")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants