#9 1.9 Solaris compile error (GNU getopt)

open
nobody
None
5
2008-09-01
2008-09-01
Jari Aalto
No

Please:

- Document in README library dependencies
- Have Makefile check library dependencies
/ alternatively move to Automake generated scrips,
like ./configure that will do this.

...
cmdline.c:34:20: getopt.h: No such file or directory
cmdline.c: In function `cmdline_parser':
cmdline.c:177: error: elements of array `long_options' have incomplete type
cmdline.c:178: warning: excess elements in struct initializer
cmdline.c:178: warning: (near initialization for `long_options[0]')
cmdline.c:178: warning: excess elements in struct initializer
cmdline.c:178: warning: (near initialization for `long_options[0]')
cmdline.c:178: warning: excess elements in struct initializer
...
cmdline.c:177: error: storage size of 'long_options' isn't known
cmdline.c:204: warning: implicit declaration of function `getopt_long'
cmdline.c:177: warning: unused variable `long_options'
make: *** [cmdline.o] Error 1

Discussion