Monday, January 7, 2008

Compileing CGAL 3.3 with Visual Studio 2008

This appears to be a pain in the ass, but I suppose it could have been worse.

Apparently, the hardest part is to get GMP compiled correctly. These are ran under cygwin.

Static linked debug version (see: http://gmplib.org/manual/Build-Options.html)
./configure --prefix=/d/gmp --enable-alloca=debug --enable-assert --disable-shared CFLAGS=-g ABI=32
Static linked release version
./configure --prefix=/d/gmp --disable-shared ABI=32 --enable-alloca=malloc-reentrant
Where /d/gmp is the install location on D:/ drive

Building mpfr

- in cygwin apply patches to version 2.3.0 (in source dir):
patch -N -Z -p1 < ../patches

- in msys
Release:
./configure --prefix=/d/mpfr-static-release --with-gmp-include=/d/gmp-static-release/include --with-gmp-lib=/d/gmp-static-releas
e/lib --with-gmp-build=../gmp-4.2.2-static-release --disable-shared

Debug
./configure --prefix=/d/mpfr-static-debug --with-gmp-include=/d/gmp-static-debug/include --with-gmp-lib=/d/gmp-static-debug/lib
--with-gmp-build=../gmp-4.2.2-static-debug --disable-shared CFLAGS=-g --enable-assert --enable-alloca=debug

Rename all the *.a files to *.lib.

No comments: