[gecode-users] Compiling statically
Guido Tack
tack at ps.uni-sb.de
Sat Nov 7 19:00:40 CET 2009
The Gecode libs themselves cannot be linked statically (e.g. against
libstdc++), they're just archives of object files, after all. One
problem with the current build system is that if you've built dynamic
libs before and they're still in the directory, they will be used for
linking. If you --enable-static --disable-dynamic in a fresh source
directory, the executables should be linked against the static Gecode
libs.
Another question is whether they should be linked fully statically
after configuring with --enable-static, or just use the static Gecode
libs but still link libstdc++ dynamically. No idea what's more useful
there - but I guess we could add -static to the linker options.
Cheers,
Guido
Lars Kotthoff wrote:
>> we currently don't support creating both static and dynamic
>> libraries,
>> and our configure script has a bug, it doesn't switch off dynamic
>> libs
>> when you say --enable-static. Please try --enable-static --disable-
>> dynamic, I think it should work.
>
> Thanks Guido, unfortunately it still doesn't work. The produced
> libraries and
> binaries are still dynamically linked and the Makefile doesn't
> contain "-static"
> anywhere.
>
> Lars
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
More information about the gecode-users
mailing list