> 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).
On Mac (and probably Windows) it's quite reasonable not to link completely
statically I think because the
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
> 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.
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 yo
> 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 does
Hi Lars,
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.
Cheers,
Guido
Lars Kotthoff wr
Hi all,
I've tried (and failed) to compile and linked Gecode statically.
./configure --enable-static doesn't seem to change anything and if I add -static
manually, it fails to compile with
g++ -pthread -static gecode/support/exception.o gecode/support/heap.o
gecode/support/thread/thread.o gecod