[gecode-users] Compilation problem with GecodeJ 1.0.0 (debian linux)
Patrick Pekczynski
pekczynski at ps.uni-sb.de
Wed Oct 4 18:41:47 CEST 2006
Salut Stéphane,
> Hi,
>
> I have the following error when executing an example with GecodeJ :
>
> GecodeJ/release-1.0.0/$ java -Djava.library.path=. examples.Queens
> Gecode native code library failed to load.
> java.lang.UnsatisfiedLinkError:
> /home/szampelli/UCL/Recherche/Code/GecodeJ/release-1.0.0/libgecodejava.so:
> /home/szampelli/UCL/Recherche/Code/GecodeJ/release-1.0.0/libgecodejava.so:
> undefined symbol: _ZTIN6Gecode6Search10MemoryStopE
Joining the new GecodeJ - hype ;-) I had exactly the same problem where
java complained about
undefined symbol: _Z.....someGecodefunction.......
Somehow I realized that I still had configured my Gecode version I'm
working at using
--enable-static --disable-shared
I just gave it a shot and recompiled Gecode with the standard configure
options, that is
--enable-shared [ turned on by default]
Afterwards I recompiled GecodeJ and checked that all the paths are ok,
that is
PKG_CONFIG_PATH having the path to the installation directory of the
gecode.pc for setting up the libs and
LD_LIBRARY_PATH having the path to libgecodejava and the path to the
Gecode libraries
so the funny thing was using shared libraries instead of static ones the
GecodeJ interface worked out beautifully
using something like
java examples/Money
as described in the documentation.
As I do not know what your "configure"-options were I was just guessing
you did the same and I hope that
I could help you out on that one.
Maybe you can post them here, if this does not help you.
Best regards
Patrick
PS: Bonjour à Pierre, Jean et Grèg
More information about the gecode-users
mailing list