[gecode-users] Compiling Gecode/J 1.0.0 on Windows

Alexander Koller koller at coli.uni-saarland.de
Sat Sep 30 18:07:29 CEST 2006


Hi all,

I just had some trouble compiling Gecode/J 1.0.0 under Windows, and I
thought I'd share my experiences. I'm using the free MS Visual C++
compiler (although it might an older version; this is 13.10.3077),
Cygwin, and the binary distribution of Gecode 1.3.0.

When I ran "configure", it complained that it couldn't find the packages
gecode, gecode-search, and gecode-minimodel. I didn't know how to use
the PKG_CONFIG_PATH variable, so I tried to go for setting the
Gecode_LIBS and Gecode_CFLAGS variables. Because I'm lazy, I simply
copied the contents of the "lib" and "include" directories into the
Gecode/J directory, rather than futzing around with pathnames.
I also set Gecode_CFLAGS to "-I." and Gecode_LIBS to /link /libpath:.

But the linker kept giving me error messages about unresolvable symbols
anyway. After a while I figured out that the *.lib files from the Gecode
distribution need to be included as extra input files in the cl call,
like so:

cl -I"c:/Programme/Java/jdk1.5.0/include" \
  -I"c:/Programme/Java/jdk1.5.0/include win32" -nologo -EHsc -GR -Ox \
  -LD GecodeSpace.obj Gecode_wrap.obj GecodeInt.lib GecodeKernel.lib \
  GecodeMinimodel.lib GecodeSearch.lib GecodeSet.lib -FeGecodejava.dll \
  /link "/libpath:."

(I just copy & pasted the call from the Make run for my configuration
and added the libs.)

This command runs successfully, and afterwards you can run "make" to
complete the build process.

Now while this works, it's clearly not what you guys had in mind for the
build process. Is there an easier way, and could you document it in the
compile instructions?

Cheers,
 Alexander.





More information about the gecode-users mailing list