main.c:921: error: elements of array `options' have incomplete type
Solution: just #include <getopt.h> in main.c
Logged In: YES user_id=503368
Actually, the correct way to do it seems to be #include <unistd.h> instead of #include <getopt.h>, which might be glibc-specific.
The system I encountered this error on was gentoo, gcc+glibc.
Sorry, getopt_long is not POSIX, so your first solution was okay. How about this?
--- main.c.bak 2005-01-12 23:00:58.000000000 +0100 +++ main.c 2018-04-21 00:01:58.000000000 +0200 @@ -38,9 +38,7 @@ #include "game2bin.h" #include "animation.h" -#ifdef WIN32 #include "getopt.h" -#endif static char *VERSION = "1.2.2";
Log in to post a comment.
Logged In: YES
user_id=503368
Actually, the correct way to do it seems to be #include
<unistd.h> instead of #include <getopt.h>, which might be
glibc-specific.
The system I encountered this error on was gentoo, gcc+glibc.
Sorry, getopt_long is not POSIX, so your first solution was okay. How about this?
Last edit: Stefan Haubenthal 2018-04-20