I am having a hard time figuring out how to add getopt.h in my AIX 7.1. I am using the getopt_long
function in my code, which I know is in getopt.h instead of unistd.h (which contains getopt()
).
This code is not compiling in AIX:
fatal error: getopt.h: No such file or directory
#include <getopt.h>
^
compilation terminated.
Here are the gcc packages installed:
gcc-4.8.3-1.aix7.1.ppc.rpm
gcc-c++-4.8.3-1.aix7.1.ppc.rpm
libgcc-4.8.3-1.aix7.1.ppc.rpm
gcc-cpp-4.8.3-1.aix7.1.ppc.rpm
I have gone through these links, but they haven't helped much:
- http://www.ibm.com/developerworks/aix/library/au-unix-getopt.html#sthash.Loz3H0AH.dpuf
- http://www.linuxmisc.com/8-freebsd/eb9bdab1cf6044d5.htm
Also a lot of other web searches.
Am I missing some rpms, or some environment variables?