RE: Gcc static linking problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Meng.

I used ldd on my program. The library libstdc++.so.5 is still listed.

I also added the LD_OPTIONS = -Bstatic. This caused problems with the
library gcc_s. The linker is looking for libgcc_s.a, but not finding it.
Even if I put a -Bdynamic in front of it or list libgcc_s.so.1
explicitly on the compile line it still looks for the static version.

Since Solaris is going away from static linking anyway I am going to
give up on this problem. Thank you for all of your help.

Tim

-----Original Message-----
From: Meng-Hsueh Chiang [mailto:mhchiang@xxxxxxxx] 
Sent: Wednesday, August 13, 2003 1:28 AM
To: Tim Purkerson
Cc: gcc-help@xxxxxxxxxxx
Subject: RE: Gcc static linking problems



> Thanks everyone for the help. However, it is still not working 
> properly.
> 
> 
> By changing the order around like Meng and Claudio suggested I was 
> able to get the application to compile and link. The problem is that 
> it did not link statically.

Can you try
ldd "your program"
to see what libraries are linked. I wondered why it wasn't link
statically if you have -static option. I guess the static link would
require *.a library. This might not be a gcc issue.
> 
> Is there something in gcc that could change the link defaults? Or is 
> this a Solaris issue?
> 
try:
setenv LD_OPTIONS      -Bstatic
> 
Good luck 
-Meng


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux