[gecode-users] Compiling statically
Guido Tack
tack at gecode.org
Sat Jul 3 09:39:17 CEST 2010
Dhananjay Thiruvady wrote:
> Hi all,
>
> I have problems when I try to compile my executable statically. After reading through the archives my configure options look like:
>
> ./configure --enable-static --disable-shared --disable-examples
>
> This creates the appropriate *.a files. When I try to compile my program I get errors of the following type:
>
> /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../lib/libgecodeint.a(int.o): In function `Gecode::Support::Mutex::acquire()':
> ~/Documents/gecode-3.3.1/./gecode/support/thread/pthreads.hpp:54: undefined reference to `pthread_mutex_lock'
>
> I'm using gcc 4.3.3. Any help with this will be appreciated.
Most probably, you are missing the -pthread or -lpthread option. If that doesn't work, see what happens when you remove the --disable-examples. Can the examples be compiled successfully, and do they run?
Cheers,
Guido
--
Guido Tack, http://people.cs.kuleuven.be/~guido.tack/
More information about the users
mailing list