Compile error using GMSH 4.8.1 + OOC 7.5

Dear all,

I am trying to compile GMSH4.8.1 under windows 10 64bit + VS2019. I used the OOC7.5 (by putting win64/vc14/lib and inc into GMSH folder) and the following errors displayed:

Severity    Code    Description    Project    File    Line    Suppression State
Error    LNK2019    unresolved external symbol "public: void __cdecl Standard_ErrorHandler::Callback::RegisterCallback(void)" (?RegisterCallback@Callback@Standard_ErrorHandler@@QEAAXXZ) referenced in function "private: void __cdecl Standard_Mutex::Sentry::Lock(void)" (?Lock@Sentry@Standard_Mutex@@AEAAXXZ)    gmsh    E:\gmsh\gmsh-4.8.1-source\64bit\OCCFace.obj    1    
Error    LNK2001    unresolved external symbol "public: void __cdecl Standard_ErrorHandler::Callback::RegisterCallback(void)" (?RegisterCallback@Callback@Standard_ErrorHandler@@QEAAXXZ)    gmsh    E:\gmsh\gmsh-4.8.1-source\64bit\OCCRegion.obj    1    
Error    LNK2001    unresolved external symbol "public: void __cdecl Standard_ErrorHandler::Callback::RegisterCallback(void)" (?RegisterCallback@Callback@Standard_ErrorHandler@@QEAAXXZ)    gmsh    E:\gmsh\gmsh-4.8.1-source\64bit\GModelIO_OCC.obj    1    
Error    LNK2019    unresolved external symbol "public: void __cdecl Standard_ErrorHandler::Callback::UnregisterCallback(void)" (?UnregisterCallback@Callback@Standard_ErrorHandler@@QEAAXXZ) referenced in function "private: void __cdecl Standard_Mutex::Sentry::Unlock(void)" (?Unlock@Sentry@Standard_Mutex@@AEAAXXZ)    gmsh    E:\gmsh\gmsh-4.8.1-source\64bit\OCCFace.obj    1    
Error    LNK2001    unresolved external symbol "public: void __cdecl Standard_ErrorHandler::Callback::UnregisterCallback(void)" (?UnregisterCallback@Callback@Standard_ErrorHandler@@QEAAXXZ)    gmsh    E:\gmsh\gmsh-4.8.1-source\64bit\OCCRegion.obj    1    
Error    LNK2001    unresolved external symbol "public: void __cdecl Standard_ErrorHandler::Callback::UnregisterCallback(void)" (?UnregisterCallback@Callback@Standard_ErrorHandler@@QEAAXXZ)    gmsh    E:\gmsh\gmsh-4.8.1-source\64bit\GModelIO_OCC.obj    1    
 

After I went back to OOC 7.4, the compile was successful. 

Could anyone help me to take a look at this problem?

Thanks,

Tang Laoya

sslcpp's picture

Hello Mr. Tang, have you solved this problem, I also encountered the same problem

Kirill Gavrilov's picture

I guess that this particular issue should be fixed in development branch of GMSH.

sslcpp's picture

Thank you very much. sir

sslcpp's picture

Finally, I switched to the occ version of 6.91, and there is no such problem.

Kimra01's picture

hi, I would like to know if you don't mind...
How did you compile opencascade? using static build or shared?
I am using cmake and the static build is required for my project however it doesn't build any library in OCCT folder, as in the bind is empty and the libd folder is also empty.
on top of that I get an MSB3073 error.