public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* -whole-archive switch...
@ 2002-03-12 14:23 Venkatakrishnan, V
  0 siblings, 0 replies; 3+ messages in thread
From: Venkatakrishnan, V @ 2002-03-12 14:23 UTC (permalink / raw)
  To: gcc-help

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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: -whole-archive switch...
@ 2002-03-12 14:55 Lingegowda, Nagesh
  0 siblings, 0 replies; 3+ messages in thread
From: Lingegowda, Nagesh @ 2002-03-12 14:55 UTC (permalink / raw)
  To: 'Venkatakrishnan, V'; +Cc: gcc-help

hello,

include the include dir of the snmp package what u are using.

Use gcc .. -I /opt/OV/include ..like

thanks
Nagesh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: -whole-archive switch...
@ 2002-03-12 14:43 Venkatakrishnan, V
  0 siblings, 0 replies; 3+ messages in thread
From: Venkatakrishnan, V @ 2002-03-12 14:43 UTC (permalink / raw)
  To: 'Lingegowda, Nagesh'; +Cc: gcc-help

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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-03-12 22:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-12 14:23 -whole-archive switch Venkatakrishnan, V
2002-03-12 14:43 Venkatakrishnan, V
2002-03-12 14:55 Lingegowda, Nagesh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).