[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Static link libstdc++.so on Solaris
From: |
stueken |
Subject: |
Re: Static link libstdc++.so on Solaris |
Date: |
3 Mar 2005 05:01:40 -0800 |
User-agent: |
G2/0.2 |
first, you need a static version of the library: libstdc++.a
The problem is, that if libstdc++.a is found in the same directory
as libstdc++.so, g++ preferres the shared lib. For libc.so/libc.a
this can be changed by "-static-libgcc". Unfortunately an equivalent
option like " -static-libstc++" is missing for gcc.
The solution I found: mv cp or just link the static libstdc++.a
to a seperate directory (may even be ".") and point the
linker to it with: "-L."
So you don't need to make the whole binary static.
Shared solaris system libs are OK. You may verify the
shared libs requred with the "ldd" utility.