Originally posted by: amar.nv
While porting changes from Linux to AIX, I faced problem w.r.t getopt_long() function.
I am using AIX 6.1.
GCC version :
Using built-in specs.
Target: powerpc-ibm-aix6.1.0.0
Configured with: ../gcc-4.4.6/configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran --prefix=/opt/freeware --enable-threads --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --host=powerpc-ibm-aix6.1.0.0
Thread model: aix
gcc version 4.4.6 (GCC)
Also I came across article in IBM's technical library "Command Line Processing with getOpt()" where I can understand that I can use function getopt_long() on AIX as well.
http://www.ibm.com/developerworks/aix/library/au-unix-getopt.html Question :
Linux's getopt.h is part of AIX's unistd.h with an exception of getopt_long().
During comilation, I get an error "error: 'getopt_long' was not declared in this scope".
Please guide me, How can I reslove this issue.
Thanks.
#AIX-Forum