[CMake] Can't get static executable
Bill Hoffman
bill.hoffman at kitware.com
Fri Jan 11 09:14:26 EST 2008
Steven Van Ingelgem wrote:
> Sorry Eneko,
>
>
> I should have been more clear.
> It works nicely in CVS under Linux because the "-L<dir> -Wl,-Bstatic
> -l<lib>"flags get set correctly. Under a Mac this doesn't work because
> they use v401 of GCC, which seems to not understand those flags.
>
> The change which is needed should be to allow the full path to an
> archive, and not re-interpret it (for example use
> "/lib/libwxbase29u.a" instead of changing it to "-L/lib -Wl,-Bstatic
> -lwxbase29u")
>
> What has been discussed can be not better described than what Brad
> told in the bug report:
> http://public.kitware.com/Bug/view.php?id=3832
>
> Hopes this helps you in your efforts.
>
OK, so, the work around you can do for now, is to put all your static
libraries in one directory with sym links and put that directory first.
A bit ugly, but if you need to ship a release, it should work. So,
that is the manual work around.
Changing to full path links will be a major change, and will likely
destabilize CVS CMake for a few weeks. We will do it, but it is not an
"Easy" fix.
So, on Linux you it should be not to hard to create a static build. OS
X does have an issue now.
-Bill
More information about the CMake
mailing list