some trouble with using gcc on SunOS

Alexandre Oliva aoliva@redhat.com
Sat Jun 23 00:21:00 GMT 2001


On Jun 22, 2001, RAMBOZ H InfoEdpRsaVdf <Herve.Ramboz@socgen.com> wrote:

> scedev:/export/home/herve/sources> gcc  -ltngdt envoi_simple.c

The order of arguments matters when linking.  This is not a GCC thing,
but a linker thing.  When the linker processes libtngdt, it doesn't
know /var/tmp/ccUUQ9VP.o (the temporary object file created from
envoi_simple.c) is going to need TNGDT_Server_Connect from the
library, so it doesn't bring this symbol in.  Then, when it gets to
the object file, it won't go back.  Reorder the flags and it should
work.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



More information about the Gcc-help mailing list