To resolve linking errors, you need to step through the linking process performed by the linker. To do this, perform the following procedures:
This will display the libraries called by your linker. Use this information to help determine which files need to be replaced.
Refer to the man page supplied with your compiler to determine the verbose mode switch. The following table lists the verbose mode switch for some operating systems.
For example, running the Sparc C Compiler 3.0 with the verbose switch, -#, for my_job.o:
Refer to the documentation supplied with your compiler for more information about static linking. For example, on Solaris the -Bstatic and -Bdynamic compiler switches are used to force modules to statically link wherever possible:
/usr/ccs/bin/ld ‑Bstatic /opt/SUNWspro/SC3.0/lib/crti.o /usr/share/lsf/lib/ckpt_crt0.o /opt/SUNWspro/SC3.0/lib/__fstd.o /opt/SUNWspro/SC3.0/lib/values-xt.o ‑o my_job my_job.o /usr/share/lsf/lib/libckpt.a ‑Y P,/opt/SUNWspro/SC3.0/lib:/usr/ccs/lib:/usr/lib ‑Qy ‑lc ‑Bdynamic ‑ldl ‑Bstatic /opt/SUNWspro/SC3.0/lib/crtn.o