This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Gcc static linking problems


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@mail.com] 
Sent: Wednesday, August 13, 2003 1:28 AM
To: Tim Purkerson
Cc: gcc-help@gcc.gnu.org
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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]