If theres a version mis-match it may cause Dynamic Link issues. Creating an HDLM environment - HDLM system requirements - Related products when using SUSE LINUX Enterprise Server 10 - Hitachi Command Suite Dynamic Link Manager (for Linux) User Guide Chapter 3.
GNU binutils ld supports this: gcc -shared *.o -l:libfoo.a -l:libbar.a -o outfile Hitachi Command Suite Dynamic Link Manager (for Linux) User Guide Chapter 3. However, that way i have to look for the library files myself. Now if i want libfoo and libbar to be linked statically, I can name the static libraries directly gcc -dynamiclib *.o /usr/lib/libfoo.a /usr/lib/libbar.a -o outfile Which would be gcc -shared *.o -lfoo -lbar -o outfile Now to produce the 'standard' dynamically linked output file i use gcc -dynamiclib *.o -lfoo -lbar -o outfile I want to use gcc to produce a shared library, but i want to link some other libraries it depends on statically.