Use the following compile and link switches when building shared libraries on HP-UX.
compile switches
+noeh -ext +W740,749,829 +W1031 +DD64 +DSblended +FPD -Aa +ub -U_HP_INSTANTIATE_T_IN_LIB -Wc,-ansi_for_scope,on -mt -z
link switches
-b -Wl,+s