Use the following compile and link switches when building shared libraries on Linux.
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
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