Linux switches

Use the following compile and link switches when building shared libraries on Linux.

g++ 4.1.1 on x86

compile switches

-fPIC -fsigned-char -fno-exceptions -pthread -fno-omit-frame-pointer 
-Wno-deprecated -Wno-ctor-dtor-privacy

link switches

-ldl -lnsl -lm -lpthread -shared -Wl,-Bsymbolic -Wl,-shared
Note: gcc can be used on Linux as well. While linking with gcc, link in the C++ run-time library by adding -lstdc++ to the link switches.

xlC 8.0 on a PowerPC

compile switches

 -q64 -qarch=ppc64 -qcheck=nullptr -qinfo=gen -qtbtable=full -qsrcmsg 
-qnoansialias -qminimaltoc -qmaxmem=-1 -qenum=int -qhalt=e -qflag=w -qthreaded 
-qxflags=NLOOPING -qtmplinst=none

link switches

-qmkshrobj -ldl -lg  -qthreaded -lnsl -lm


Created November 2, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com