FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5892 Discussions

can't able to use usleep function in ARM DS-5

Altera_Forum
Honored Contributor II
2,072 Views

Hi, 

I am working with ARM DS-5 builder.I want to use Usleep function but it always display error like: 

"undefined reference to `usleep'"  

- I have already included unistd.h and when I click on usleep then it opens unistd.h. 

- I have also added path at program properties>C/C++ general>Paths and Symbols>Add. 

 

but still when I build project it gives error of undefined reference. 

 

Also I want ot measure time taken by particular C function but whrn I try to include windows.h then it display error. 

 

 

I am working with windows7 64bit system on Cyclone V soc development kit.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
937 Views

#include "sys/unistd.h" 

or  

# include <unistd.h> 

 

?
0 Kudos
Altera_Forum
Honored Contributor II
937 Views

tried with following options: 

 

# include "sys/unistd.h" 

# include "unistd.h" 

# include <sys/unistd.h> 

# include <unistd.h> 

 

still not working..
0 Kudos
Altera_Forum
Honored Contributor II
937 Views

 

--- Quote Start ---  

tried with following options: 

# include "sys/unistd.h"# include "unistd.h"# include <sys/unistd.h># include <unistd.h> 

 

still not working.. 

--- Quote End ---  

 

 

Hello 

 

Have you found a solution to this ? We are experiencing the same issue 

 

Regards 

Mathieu
0 Kudos
Reply