[gecode-users] Compiling statically

Guido Tack tack at ps.uni-sb.de
Sat Nov 7 17:53:57 CET 2009


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 wrote:

> 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 gecode/support/thread/ 
> windows.o gecode/support/thread/pthreads.o -Wl,- 
> soname=libgecodesupport.so.19 \
> 		-o libgecodesupport.so.19.0
> /usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../lib/crt1.o: In  
> function `_start':
> /build/buildd-eglibc_2.10.1-5-i386-GOKbsH/eglibc-2.10.1/csu/../ 
> sysdeps/i386/elf/start.S:115: undefined reference to `main'
> collect2: ld returned 1 exit status
> make[1]: *** [libgecodesupport.so.19.0] Error 1
>
> Gcc version (Debian 4.3.4-6) 4.3.4. Any advice on what to change to  
> make it
> work?
>
> Thanks,
>
> 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