This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Gcc static linking problems
- From: "Meng-Hsueh Chiang" <mhchiang at mail dot com>
- To: "Tim Purkerson" <timp at apcon dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 13 Aug 2003 03:27:58 -0500
- 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