Problem creating shared object library that references another

Glen Cordrey glen.cordrey@digitalfocus.com
Fri Mar 15 08:46:00 GMT 2002


I am attempting to create a .so that contains code that uses another .so.
Following directions found on the web I am doing

gcc -shared -Wl,-soname,libbar_java.so bar.o libfoo.so -o
libbar_java.so

where bar contains code that depends on libfoo.so. However, this command
reports

ld: warning: option -o appears more than once, first setting taken
ld: fatal: file libBondCalculator.so: unknown file type
ld: fatal: File processing errors. No output written to libBondCalculator.so
collect2: ld returned 1 exit status

I am using version 2.95.2 of gcc on Solaris. I've noticed that the man page
for gcc doesn't
list soname as an option.

Does anyone have any suggestions?


Glen Cordrey                         Digital Focus
office: 703.561.5917               13825 Sunrise Valley Dr.
cell:   571.220.8955                Herndon, VA 20171
                                             www.digitalfocus.com



More information about the Gcc-help mailing list