On Wed, 28 Jan 2004, Shachar Tal wrote:

> On Wed, 28 Jan 2004, guy keren wrote:
>
> > please paste it anyway. when you say "trust me" - i don't. neither should
> > you trust yourself. show us the actual command, as it gets executed.
>
> there you go:
>
> /usr/bin/gcc -o ../../run/linux/prerelease/agct.gprof -pg
> -L../../lib/linux/prerelease -lagct -lagsc -lagdb -lagdm -lutos -lutll
> -lagrp -lagsi -lagmi -lcmag -lcmrp -lagrp -lagsi -lagmi -lcmcn -lcmrp
> -lagrp -lagsi -lagmi -lagsc -lagoi -lcmrp -luttc -lcmrp -lcmcn -lcmnp
> -lutlg -lutos -lcmag -lagom -lutos -lagdb -lagoi -lcmrp -luttc -lagsi
> -lagdb -lagoi -lcmrp -lutos-ldl -lpthread -lm -lnsl
> ../../../../shared/3rdparty/lib/tcl/linux/libtcl8.3.a
> /usr/lib/libstdc++.a

ok. now come the nit-peak questions:

1. you use 'gcc', and yet you link 'libstdc++'. why don't you use g++
   then? are you trying to avoid linking with the shared g++ library?

2. i assume that '-lutos-ldl' is just a typo in your copy-paste,
   and that it actually means '-lutos -ldl' (i.e. an extra space). is
   this correct?

3. you should put the system libraries _last_, i.e. "-lpthread -lm -lnsl"
   should come _after_ anything else (including libstdc++).

4. can you run 'ldd' on the resulting libary, and send the output?

some thing that are probably not related to your current problem:

4. you link the _entire_ c++ library into your code? why?

5. you have many libraries specified twice and thrice on the command line.
   what for? if that's due to tripple circular dependencies problems,
   then that's baaad. i guess its code you inherrited from someone else...

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


--------------------------------------------------------------------------
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]


Reply via email to