I’m trying to compile a C program that I downloaded off the internet using cl.exe at the command line in Windows. This file includes gnu C library files such as getopt.h and unistd.h, which are not available by default under Windows. How can I gain access to these (while still using the cl.exe compiler).
Thanks.
The files getopt.h and unistd.h are header files. It is better to uses a gnu compatible compiler like MINGW32. Since replacing this files is in general not enough to get your library compiling and running under a windows-compiler. If you still want to use cl.exe then replace “unistd.h” by “windows.h” and get the win32 compatible “getopt” from the internet.