how to use Linux lib such as timeval in windows I have installed cygwin and dev c++ I don't like compliling in cygwin compliling under dev c++ always erro like `gettimeofday' undeclared (first use this function)
unfortunately, I don't have enough harddisk space to install a linux or any vitual machine
thanks a lot
-
You can't use Linux code straight away in Windows, of course.
But it seems you're trying to do this using Cygwin, which should support the Linux/POSIX APIs.
If the error you're getting is a compile-time (and not linker) error, you probably are missing the proper header file:
#include <sys/time.h>
These are documented on
gettimeofday()
's man page.flankechen : I have added the right header files My question now is how to associate cygwin and the dev-cpp I would like to compile and debug my program in dev-cpp using the linux APIs Is there any way? come on, help me -
after all it seems that we cann't use linux lib directly in windows my cygwin sugffers from all kinds of problems finally I install vmware, a vitual linux machine and done that which may be not a wise way but a practical one
0 comments:
Post a Comment