[Gmsh] Undefined Reference to 'Interface_Static' When Build API Demo

Su Tian tian50 at purdue.edu
Thu Apr 5 18:15:56 CEST 2018


Hello,

 

I want to build Gmsh as a library (libgmsh.a) with OCC and API.

Now I can successfully build the library with API and without OCC, and build
and run demos from 't1' to 't6'.

 

Then I turn on the OCC option when building libgmsh.a. CMake can find the
OpenCASCADE version information and libraries without any problem, and
libgmsh.a seems built successfully. However, when I try to build the demo
'boolean', there are OCC linking errors. The first several lines are:

 

C:/dev/gmsh/occ/lib/libgmsh.a(GModelIO_OCC.cpp.obj):GModelIO_OCC.cpp:(.text+
0x60): undefined reference to `Interface_Static::SetCVal(char const*, char
const*)'

C:/dev/gmsh/occ/lib/libgmsh.a(GModelIO_OCC.cpp.obj):GModelIO_OCC.cpp:(.text+
0xc8): undefined reference to `TopoDS_Shape::HashCode(int) const'

C:/dev/gmsh/occ/lib/libgmsh.a(GModelIO_OCC.cpp.obj):GModelIO_OCC.cpp:(.text+
0xfc): undefined reference to `TopLoc_Location::IsEqual(TopLoc_Location
const&) const'

C:/dev/gmsh/occ/lib/libgmsh.a(GModelIO_OCC.cpp.obj):GModelIO_OCC.cpp:(.text+
0x135): undefined reference to `TopoDS_Shape::HashCode(int) const'

C:/dev/gmsh/occ/lib/libgmsh.a(GModelIO_OCC.cpp.obj):GModelIO_OCC.cpp:(.text+
0x169): undefined reference to `TopLoc_Location::IsEqual(TopLoc_Location
const&) const'

.

 

What might be the problem?

 

I build everything (OCC libraries, libgmsh.a, and boolean.exe) using C++
compiler x86_64-w64-mingw32-g++.

 

Thank you.

 

Sam



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20180405/4c843334/attachment.html>


More information about the gmsh mailing list