-whole-archive switch...
Venkatakrishnan, V
V.Venkatakrishnan@channels.usa.xerox.com
Tue Mar 12 14:43:00 GMT 2002
Hmmmmmmmm why and where do I need to include header files? All the symbols
are defined in static libs which 've been successfully compiled. A bunch of
these static libs are then linked to an obj, to form a shared lib, which get
loaded dynamically by my app.
Yeah I'm working on SNMP.
Regards,
Venky
-----Original Message-----
From: Lingegowda, Nagesh [mailto:Nagesh.Lingegowda@gtech.com]
Sent: Tuesday, March 12, 2002 5:31 PM
To: 'Venkatakrishnan, V'
Subject: RE: -whole-archive switch...
Hello,
Are u including the header files needed by the library XsnmpLib ? use -I to
do that. It should work.
It looks like u are working on snmp stuff.
Thanks
Nagesh
-----Original Message-----
From: Venkatakrishnan, V [mailto:V.Venkatakrishnan@channels.usa.xerox.com]
Sent: Tuesday, March 12, 2002 5:21 PM
To: gcc-help@gcc.gnu.org
Subject: -whole-archive switch...
Hi,
I'm using this command
gcc -L. -Wl,-whole-archive -lXtlLib -lXrtlLib -lXenvhlpLib -lSnmpAuxiLib
-lSnmpLib -lXsnmpLib -lsocket -lnsl -fPIC -shared -o TrapRegister.so
register.o or even gcc -L. -Wl,-whole-archive -lXtlLib -lXrtlLib
-lXenvhlpLib -lSnmpAuxiLib -lSnmpLib -lXsnmpLib -lsocket -lnsl
-Wl,-no-whole-archive -fPIC -shared -o TrapRegister.so register.o to build a
shared lib.
But when I load it thru an app I get an error saying that a symbol
defined in XsnmpLib is not found, earlier it was a symbol in XtlLib, it
seems that the whole-archive switch worked only on the first lib eventhough
I've included all of them between -whole and -no-whole-archive.
Any idea? Is there any other way I can shuffle around this switch and
make sure that all the symbols in all the libs get linked properly?
More information about the Gcc-help
mailing list