Skip to content

fix compilation error in ubuntu16.04 #834

Open
varyshare wants to merge 5 commits into
raulmur:masterfrom
varyshare:master
Open

fix compilation error in ubuntu16.04 #834
varyshare wants to merge 5 commits into
raulmur:masterfrom
varyshare:master

Conversation

@varyshare

Copy link
Copy Markdown

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

YangSiri commented Dec 13, 2019

Copy link
Copy Markdown

Hi, @varyshare

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

@varyshare

varyshare commented Dec 13, 2019

Copy link
Copy Markdown
Author

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
Copy Markdown

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