[Gmsh] Compiling gmsh with opencascade on debian

Jose Paulo Moitinho de Almeida moitinho at civil.ist.utl.pt
Mon Jun 23 16:43:56 CEST 2008


Debian lenny now has opencascade in its repository. 

This is a summary of what I did to get it working with gmsh:

- Install the opencascade packages
$ mkdir /usr/opencascade (could be any other place...)
$ ln -s /usr/include/opencascade /usr/opencascade/inc

Go to the gmsh source base directory
$ ./configure --enable-occ --with-occ=/usr/opencascade

The tricky part was discovering that we need to add -D_OCC64 to FLAGS in the 
variables file. Wouldn't it be possible to include this in the configure 
script? Something like the attached diff or some defines in the include 
files?

$ make

Regards

ZP

*** configure.in        2008-06-07 23:43:58.000000000 +0100
--- configure.new       2008-06-23 15:36:22.000000000 +0100
***************
*** 804,809 ****
--- 804,812 ----
      AC_MSG_WARN([Unsupported size of size_t - this may affect FNV hashing.])
    else
      FLAGS="${FLAGS} -DHAVE_64BIT_SIZE_T"
+     if test "x${OCC}" = "xyes"; then
+        FLAGS="${FLAGS} -D_OCC64"
+     fi
    fi
  fi