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 compilation error in ubuntu16.04 #834

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

varyshare
Copy link

Reason: not include the headfile #include <unistd.h>

error message

error: 'usleep' was not declared in this scope usleep(*);

without the headfile `#include <unistd.h>` 

error message
```
error: 'usleep' was not declared in this scope usleep(*);
```
**Reason**: not include the headfile `#include <unistd.h>` 

**error message**
```
error: 'usleep' was not declared in this scope usleep(*);
```
**Reason**: not include the headfile `#include <unistd.h>` 

**error message**
```
error: 'usleep' was not declared in this scope usleep(*);
```
**Reason**: not include the headfile `#include <unistd.h>` 

**error message**
```
error: 'usleep' was not declared in this scope usleep(*);
```
**Reason**: not include the headfile `#include <unistd.h>` 

**error message**
```
error: 'usleep' was not declared in this scope usleep(*);
```
@YangSiri
Copy link

YangSiri commented Dec 13, 2019

Hi, @varyshare

I git the newest ORB-SLAM2. But how come i still face this problem?

@varyshare
Copy link
Author

varyshare commented Dec 13, 2019

Hi, @varyshare

I git the newest ORB-SLAM2. But how come i still face this problem?

you need add #include <unistd.h> in every files when the file contain this code usleep().

你需要找找你使用的那些源代码文件中有没有使用unsleep()这个函数,只要使用了它就需要加#include <unistd.h> 这一行代码

@YangSiri
Copy link

Okay....... @varyshare

Thanks anyway~

guillaumemoreau added a commit to guillaumemoreau/ORB_SLAM2 that referenced this pull request Apr 14, 2020
guillaumemoreau added a commit to guillaumemoreau/ORB_SLAM2 that referenced this pull request Apr 14, 2020
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.

2 participants