occ::importShapes Access violation reading location
Hello, I have built GMSH on Windows using CMake GUI. I have enbled OCC_CAF, OCC_STATIC, MESH, EIGEN, BUILD_SHARED, BUILD_DYNAMIC. I set CMAKE_PREFIX_PATH__ to OpenCascade 7.7.0; FREETYPE_LIBRARY__ to OpenCASCADE-7.7.0-vc14-64/freetype-2.5.5-vc14-64/lib/freetype.lib (from OpenCascade); FREETYPE_INCLUDE_DIRS__ to OpenCASCADE-7.7.0-vc14-64/freetype-2.5.5-vc14-64/include (from OpenCascade);
CMake output:__
Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22621.
Found 64Bit
Found Eigen[contrib]
Found Mesh
Found TetGen/BR
Found OpenCASCADE version 7.7.0 in D:/Maprehend/Repositories/OpenCASCADE-7.7.0-vc14-64/opencascade-7.7.0/inc
Found Freetype: D:/Maprehend/Repositories/OpenCASCADE-7.7.0-vc14-64/freetype-2.5.5-vc14-64/lib/freetype.lib
Found OpenCASCADE-CAF
Found OpenCASCADE
Found NoVsnprintf
Found NoSocklenT
- Build options: 64Bit Eigen[contrib] Mesh NoSocklenT NoVsnprintf OpenCASCADE OpenCASCADE-CAF TetGen/BR
- Build type: RelWithDebInfo
- C compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe
- C++ compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe
- Install prefix: D:/Maprehend/Repositories/gmsh/install
Gmsh 4.11.2-git-de0ceea3 has been configured for Windows64-sdk
I opened gmsh.sln in Visual Studio 22 and built INSTALL project in Release | x64 mode successfully. Then I created an empty project and set up include and library directories for both OpenCascade and GMSH. Add path to DLLs. After I run tutorial t20.cpp from share\doc\gmsh\tutorials\c++ I got an error after gmsh::model::occ::importShapes("t20_data.step", v)__: Exception thrown at 0x00007FFE7E7D7F32 (gmsh.dll) in Test.exe: 0xC0000005: Access violation reading location 0x0000014B47AD6415.****
I would appreciate any help, thank you.