本文发表在 rolia.net 枫下论坛comiling and linking this same program on HP UX/Solaris/Linux are all okay, but for AIX, there are so many troubles.
Because it is so common I am not gonna to consider modifiy the code in program, because I believe it is an environment issue.
Here is the output:
bash-3.00# gcc -v
Using built-in specs.
Target: powerpc-ibm-aix5.3.0.0
Configured with: ../gcc-4.0.2/configure --disable-nls
Thread model: aix
gcc version 4.0.2
bash-3.00# uname -a
AIX devaix 3 5 000F067F4C00
bash-3.00# echo $OBJECT_MODE
64
bash-3.00#gcc -c -maix64 -g -DDEBUG_root -DDEBUG=1 -DXP_UNIX=1 -DAIX=1 -DSYSV=1 -DAIX_HAVE_ATOMIC_OP_H=1 -DAIX_TIMERS=1 -D_PR_HAVE_OFF64_T=1 -DHAVE_SOCKLEN_T=1 -DHAVE_FCNTL_FILE_LOCKING=1 -DHAVE_LCHOWN=1 -DHAVE_STRERROR=1 -DLDAP_DEBUG -DNET_SSL -DNO_LIBLCACHE -DLDAP_REFERRALS -DNS_DOMESTIC -DFORCE_PR_LOG -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM -D_PR_INET6 -I../../../dist/./include -I../../../../../dist/include/obsolete -I../../../../../dist/include/nspr -I../../../../../dist/AIX3_DBG.OBJ/include -I../../../../../dist/include -I../../../../../dist/public/security -I../../../../../dist/public/nss -I../../../../../dist/public/ldap -I../../../ldap/include convutf8.cpp
convutf8.cpp: In function 'char* convert_to_utf8(const char*, const char*)':
convutf8.cpp:231: error: invalid conversion from 'const char**' to 'char**'
convutf8.cpp:231: error: initializing argument 2 of 'size_t libiconv(void*, char**, size_t*, char**, size_t*)'
convutf8.cpp:234: error: invalid conversion from 'const char**' to 'char**'
convutf8.cpp:234: error: initializing argument 2 of 'size_t libiconv(void*, char**, size_t*, char**, size_t*)'
convutf8.cpp:237: error: invalid conversion from 'const char**' to 'char**'
convutf8.cpp:237: error: initializing argument 2 of 'size_t libiconv(void*, char**, size_t*, char**, size_t*)'
gmake[2]: *** [convutf8.o] Error 1
gmake[2]: Leaving directory `/usr/local/mozilla/mozilla/directory/c-sdk/ldap/clients/tools'
gmake[1]: *** [export] Error 2
gmake[1]: Leaving directory `/usr/local/mozilla/mozilla/directory/c-sdk/ldap'
gmake: *** [export] Error 2更多精彩文章及讨论,请光临枫下论坛 rolia.net