Thu, 04/14/2022 - 19:17
Hello OCCT Community,
I'm trying to build Open CASCADE 7.6.0's C# sample projects, but unfortunately I am not able to build it.
Firstly, I've added "C/C++ --> General --> Additional Include Directories" as "C:\OpenCASCADE-7.6.0-vc14-64\opencascade-7.6.0\inc"
Then, I've added " Linker --> General --> Additional Library Directories" as "C:\OpenCASCADE-7.6.0-vc14-64\opencascade-7.6.0\win64\vc14\lib"
Lastly, I've added "Linker --> Input --> Additional Dependencies" as below:
TKBinTObj.lib
TKBinXCAF.lib
TKBO.lib
TKBool.lib
TKBRep.lib
TKCAF.lib
TKCDF.lib
TKD3DHost.lib
TKD3DHostTest.lib
TKDCAF.lib
TKDFBrowser.lib
TKDraw.lib
TKernel.lib
TKFeat.lib
TKFillet.lib
TKG2d.lib
TKG3d.lib
TKGeomAlgo.lib
TKGeomBase.lib
TKHLR.lib
TKIGES.lib
TKIVtk.lib
TKIVtkDraw.lib
TKLCAF.lib
TKMath.lib
TKMesh.lib
TKMeshVS.lib
TKMessageModel.lib
TKMessageView.lib
TKOffset.lib
TKOpenGl.lib
TKOpenGles.lib
TKOpenGlesTest.lib
TKOpenGlTest.lib
TKPrim.lib
TKQADraw.lib
TKRWMesh.lib
TKService.lib
TKShapeView.lib
TKShHealing.lib
TKStd.lib
TKStdL.lib
TKSTEP.lib
TKSTEP209.lib
TKSTEPAttr.lib
TKSTEPBase.lib
TKSTL.lib
TKTInspector.lib
TKTInspectorAPI.lib
TKTObj.lib
TKTObjDRAW.lib
TKToolsDraw.lib
TKTopAlgo.lib
TKTopTest.lib
TKTreeModel.lib
TKV3d.lib
TKVCAF.lib
TKView.lib
TKViewerTest.lib
TKVInspector.lib
TKVRML.lib
TKXCAF.lib
TKXDEDRAW.lib
TKXDEIGES.lib
TKXDESTEP.lib
TKXMesh.lib
TKXml.lib
TKXmlL.lib
TKXmlTObj.lib
TKXmlXCAF.lib
TKXSBase.lib
TKXSDRAW.lib
TKBin.lib
TKBinL.lib
Error is: Error LNK1112 module machine type 'x64' conflicts with target machine type 'x86'
I'm using the "opencascade-7.6.0-vc14-64.exe" installer. Should I recompile the Open CASCADE from source code as 32-bit? You've already documented the issue, but I couldn't build the sample: https://github.com/Open-Cascade-SAS/OCCT-samples-csharp
It is necessary to explicitly set the target platform for C# assemblies to x86 in project Properties - Build to work consistently on 64-bit systems with OCCT libraries built in 32-bit mode.
Fri, 04/15/2022 - 00:02
Have you tried building x64 target?