[gecode-users] Compiling statically
Guido Tack
tack at ps.uni-sb.de
Sat Nov 7 22:04:33 CET 2009
Lars Kotthoff wrote:
> ./configure --enable-static --disable-dynamic && make
> in a clean source directory builds the static and dynamic libs (by
> which I mean
> the .a and .so files) and links the example binaries dynamically, e.g.
Ah, sorry, it's called --disable-shared, not --disable-dynamic (I
always get that wrong).
>> 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.
>
> I think they should be completely static to avoid problems with
> different
> versions of libstdc++ on different systems, especially since this
> library is not
> strictly required.
I played with this a bit, and the problem with -static is that it only
works if all libraries are actually available as static libraries,
which sometimes they aren't (e.g. on a Mac). Not sure what we're
going to do, but I'll think about it. The only thing where it really
matters is the flatzinc interpreter, the other executables are just
examples and tests anyway.
Cheers,
Guido
More information about the gecode-users
mailing list