How to use Linux lib like timeval on windows

how to use Linux lib like timeval on windows I installed cygwin and dev C ++ I don't like the compromise in cygwin complile under dev C ++ always erro like `gettimeofday 'uneclared (use this function first)

Unfortunately I don't have enough hard drive space to install Linux or any twisted machine

Many thanks

0


a source to share


2 answers


Of course, you cannot use Linux code on Windows.

But it looks like you are trying to do this with Cygwin, which should support the Linux / POSIX API.

If the error you are receiving is a compilation error (not a linker), then you probably do not have a proper header file:



   #include <sys/time.h>

      

They are described on the gettimeofday()

reference page .

+3


a source


in the end it seems that we cannot use the linux lib directly on windows my cygwin sugffers from all sorts of problems in the end I install vmware, the life linux machine and do it which may not be a reasonable way but a practical one.



0


a source







All Articles