[Gmsh] Problems encountered compiling Gmsh with OpenCascade support on Windows

Nicolas.Saugnier at loria.fr Nicolas.Saugnier at loria.fr
Thu Jun 18 16:51:00 CEST 2009


Hi!

I've been trying to build Gmsh on Windows with OpenCASCADE support,  
and I'm runnig into a few problems:

  Here is the configuration I used :

ENABLE_GUI=0
ENABLE_BLAS_LAPACK=0
ENABLE_PARSER=1
ENABLE_POSTPRO=1
ENABLE_TETGEN=0
ENABLE_NETGEN=0
ENABLE_METIS=0
ENABLE_OCC=1
ENABLE_MED=0


I used Visual C++ express 2008 on Windows XP Pro 64bits, with a  
default install of OpenCascade 6.3.0 and the nightly package sources  
20090615.

- in the topmost Makefile:
   GMSH_EXTRA_VERSION = "-cvs-20090615"
   The double quotes seams to be the origin of an error when  
generating GmshVersion.h, as the resulting version number was :
"2.3.1"-cvs-20090615""
  Removing them in the Makefile allowed me to go further.


- in variables.msvc, the relative path for OCC libs did not match the  
one of the OCC installation (I used a default OCC installation):
ifeq (${ENABLE_OCC},1)
   FLAGS+=/DHAVE_OCC /DHAVE_NO_OCC_CONFIG_H /DWNT /I${OCC_PREFIX}/inc
   GMSH_LIBS+=${OCC_PREFIX}/win32/bin/*.lib
endif

I modified the corresponding line to:
   GMSH_LIBS+=${OCC_PREFIX}/win32/lib/*.lib


- and in the 20090618 version of the nightly sources :

gmake.exe[1]: Entering directory `C:/Gmsh_stuff/gmsh-2.3.1-cvs-20090618/Geo'
cl /EHsc /nologo /GR /MT /O2 /DWIN32 /D_USE_MATH_DEFINES /DNOMINMAX  
/D_CRT_SECURE_NO_DEPRECATE /DHAVE_NO_DLL /DHAVE_ANN /DHAVE_MATH_EVAL  
/I../Common /I../Geo /I../Mesh /I../Post /I../Numeric /I../Parser  
/I../contrib/ANN/include /I../contrib/kbipack /I../contrib/MathEval  
/I../contrib/gmm /I"C:\Program Files (x86)\Microsoft Visual Studio  
9.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include;"  
/c SOrientedBoundingBox.cpp
SOrientedBoundingBox.cpp
SOrientedBoundingBox.cpp(164) : error C3861: 'fmaxf': identifier not found
SOrientedBoundingBox.cpp(164) : error C3861: 'fmaxf': identifier not found
SOrientedBoundingBox.cpp(292) : error C3861: 'fmaxf': identifier not found
SOrientedBoundingBox.cpp(293) : error C3861: 'fminf': identifier not found
SOrientedBoundingBox.cpp(343) : error C3861: 'time': identifier not found
SOrientedBoundingBox.cpp(469) : error C3861: 'fminf': identifier not found
SOrientedBoundingBox.cpp(470) : error C3861: 'fmaxf': identifier not found



In the meantime, I switched to a Linux plateform, where I also had a  
few problems, i'll put it in an other thread.
Hope this can be of use to you.


Best Regards,
Nicolas SAUGNIER