Reputation: 6197
I want to compile something on Windows. There are a few lines:
#ifdef NO_GLIBC
#include "getopt/getopt.h"
#else
#include "sys/utsname.h"
#endif
then it fails, saying "utsname.h" is missing. Thats right, since its not a Windows thing. So somehow I have to make NO_GLIBC true, how to do this?
EDIT: Ive never programmed in C, Im a Php, Delphi expert
Upvotes: 0
Views: 70
Reputation: 229108
You can define the NO_GLIBC macro with the -D flag given to gcc, e.g.
gcc -DNO_GLIBC=1 -c foo.c -o foo.o
Upvotes: 1