Skip to content
Snippets Groups Projects
Commit b4e437b4 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

*** empty log message ***

parent beb9d79b
No related branches found
No related tags found
No related merge requests found
How to build OpenCascade 6.2 for Gmsh: How to build OpenCascade 6.2 (OCC) for Gmsh:
- get the linux (source) distribution of occ - Get the linux (source) distribution of OCC and unpack it. In the
following <OpenCascade dir> refers to the directory where OCC is
installed (e.g ~/OpenCascade)
- if you're using Cygwin/Mingw32 (Windows) define - If you're using Cygwin/Mingw32 (Windows) define
export CC="gcc -mno-cygwin -DWNT=1 -DWIN32 -DHAVE_NO_DLL" export CC="gcc -mno-cygwin -DWNT=1 -DWIN32 -DHAVE_NO_DLL"
export CXX="g++ -mno-cygwin -DWNT=1 -DWIN32 -DHAVE_NO_DLL" export CXX="g++ -mno-cygwin -DWNT=1 -DWIN32 -DHAVE_NO_DLL"
- with new versions of gcc, add "-ffriend-injection" to the compiler - With new versions of gcc, add "-ffriend-injection -fpermissive" to
options (this prevents the "Standard_Transient_Type_ not declared" the compiler options (this prevents the "Standard_Transient_Type_
error) not declared" error), i.e., define
- go to the ros/ directory and type export CXXFLAGS="${CXXFLAGS} -ffriend-injection -fpermissive"
- Go to the <OpenCascade dir>/Linux/ros directory and type
./configure --prefix=/usr/local/opencascade --enable-debug=no ./configure --prefix=/usr/local/opencascade --enable-debug=no
--enable-production=yes --enable-static=yes --enable-shared=no --enable-production=yes --enable-static=yes --enable-shared=no
--disable-dependency-tracking --disable-dependency-tracking
- then go to the adm/make/ directory and run - Then go to the <OpenCascade dir>/Linux/ros/adm/make/ directory and
run "make" in the following subdirectories, e.g. by running the
following bash script:
#!/bin/bash
for lib in TKernel TKMath TKAdvTools TKG2d TKG3d TKGeomBase TKBRep for lib in TKernel TKMath TKAdvTools TKG2d TKG3d TKGeomBase TKBRep
TKGeomAlgo TKTopAlgo TKPrim TKBO TKHLR TKMesh TKShHealing TKBool TKGeomAlgo TKTopAlgo TKPrim TKBO TKHLR TKMesh TKShHealing TKBool
TKFillet TKFeat TKOffset TKXSBase TKIGES TKSTEPBase TKSTEPAttr TKFillet TKFeat TKOffset TKXSBase TKIGES TKSTEPBase TKSTEPAttr
...@@ -27,15 +34,14 @@ How to build OpenCascade 6.2 for Gmsh: ...@@ -27,15 +34,14 @@ How to build OpenCascade 6.2 for Gmsh:
cd $lib && make; cd ..; cd $lib && make; cd ..;
done done
(This is the same as doing Note that this is the same as doing "make FoundationClasses", "make
make FoundationClasses ModelingData", "make ModelingAlgorithms" and part of "make
make ModelingData DataExchange"
make ModelingAlgorithms
and part of
make DataExchange)
- and finally do - Finally, run this other bash script in the same directory (to install
the libraries)
#!/bin/bash
for lib in TKernel TKMath TKAdvTools TKG2d TKG3d TKGeomBase TKBRep for lib in TKernel TKMath TKAdvTools TKG2d TKG3d TKGeomBase TKBRep
TKGeomAlgo TKTopAlgo TKPrim TKBO TKHLR TKMesh TKShHealing TKBool TKGeomAlgo TKTopAlgo TKPrim TKBO TKHLR TKMesh TKShHealing TKBool
TKFillet TKFeat TKOffset TKXSBase TKIGES TKSTEPBase TKSTEPAttr TKFillet TKFeat TKOffset TKXSBase TKIGES TKSTEPBase TKSTEPAttr
...@@ -43,6 +49,29 @@ How to build OpenCascade 6.2 for Gmsh: ...@@ -43,6 +49,29 @@ How to build OpenCascade 6.2 for Gmsh:
cd $lib && make install; cd ..; cd $lib && make install; cd ..;
done done
and copy config.h and inc/ to /usr/local/opencascade (This is the and copy config.h and the <OpenCascade dir>/Linux/ros/inc/ subdirectory
same as a doing a partial 'make install') to /usr/local/opencascade (This is the same as a doing a partial
'make install')
OpenCascade is now installed and ready to be used by Gmsh. To compile
Gmsh with OpenCascade support:
- Go to the gmsh source directory
- Run "./configure --enable-occ --with-occ-prefix=/usr/local/opencascade" and
then "make"
- If you get errors like
undefined reference to `pthread_create'
undefined reference to `pthread_detach'
...
edit the "variables" file and add "-pthread" to the OPTIM variable, e.g.:
OPTIM="-g -O2 -pthread"
and run make again
- If compiling is successful then you are done and you can enjoy
importing IGES/STEP/BREP files into Gmsh!
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment