Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting opencascade-rs running with external OCCT #178

Open
TCWilliamson opened this issue Jul 8, 2024 · 4 comments
Open

getting opencascade-rs running with external OCCT #178

TCWilliamson opened this issue Jul 8, 2024 · 4 comments

Comments

@TCWilliamson
Copy link

Hello,

I'm a bit of a newbie to rust, and I'm trying to get this library compiling. I didn't have much success letting it compile OCCT builtin, so I've been trying to get it to play nice with the library downloaded... with little success.

I've eddited the occ_info.txt even, to point to C:\OCCT\ where I moved open cascade downloaded file

Even poked GPT for support, with little success (naturally)

I'm getting this currently, really not sure where to go from here... I might be off in the deepend? but I feel like this kind of library should really be able to be downloaded and go 'cargo run' without issue. Not sure what I'm missing here...

cargo build --no-default-features
   Compiling opencascade-sys v0.2.0 (C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\crates\opencascade-sys)
error: failed to run custom build command for `opencascade-sys v0.2.0 (C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\crates\opencascade-sys)`

Caused by:
  process didn't exit successfully: `C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\target\debug\build\opencascade-sys-1b36cd3cd467e05f\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=DEP_OCCT_ROOT
  CMAKE_TOOLCHAIN_FILE_x86_64-pc-windows-msvc = None
  CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_msvc = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-pc-windows-msvc = None
  CMAKE_GENERATOR_x86_64_pc_windows_msvc = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-pc-windows-msvc = None
  CMAKE_PREFIX_PATH_x86_64_pc_windows_msvc = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-pc-windows-msvc = None
  CMAKE_x86_64_pc_windows_msvc = None
  HOST_CMAKE = None
  CMAKE = None
  running: "cmake" "C:\\Users\\tom\\Downloads\\opencascade-rs-main\\opencascade-rs-main\\crates\\opencascade-sys\\OCCT" "-G" "Visual Studio 17 2022" "-Thost=x64" "-Ax64" "-DCMAKE_INSTALL_PREFIX=C:\\Users\\tom\\Downloads\\opencascade-rs-main\\opencascade-rs-main\\target\\debug\\build\\opencascade-sys-57b6e25be2dec311\\out" "-DCMAKE_C_FLAGS= -nologo -MD -Brepro" "-DCMAKE_C_FLAGS_DEBUG= -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS= -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS_DEBUG= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS_DEBUG= -nologo -MD -Brepro" "-DCMAKE_BUILD_TYPE=Debug"
  -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
  -- Configuring done (0.0s)
  -- Generating done (0.0s)
  -- Build files have been written to: C:/Users/tom/Downloads/opencascade-rs-main/opencascade-rs-main/target/debug/build/opencascade-sys-57b6e25be2dec311/out/build
  running: "cmake" "--build" "." "--target" "install" "--config" "Debug" "--parallel" "32"
  MSBuild version 17.10.4+10fbfbf2e for .NET Framework

    -- Install configuration: "Debug"
    -- Installing: C:/Users/tom/Downloads/opencascade-rs-main/opencascade-rs-main/target/debug/build/opencascade-sys-57b6e25be2dec311/out/share/occ_info.txt
  cargo:root=C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\target\debug\build\opencascade-sys-57b6e25be2dec311\out
  cargo:rustc-link-search=native=C:/OCCT/win64/vc14/lib
  cargo:rustc-link-lib=dylib=TKMath
  cargo:rustc-link-lib=dylib=TKernel
  cargo:rustc-link-lib=dylib=TKFeat
  cargo:rustc-link-lib=dylib=TKGeomBase
  cargo:rustc-link-lib=dylib=TKG2d
  cargo:rustc-link-lib=dylib=TKG3d
  cargo:rustc-link-lib=dylib=TKTopAlgo
  cargo:rustc-link-lib=dylib=TKGeomAlgo
  cargo:rustc-link-lib=dylib=TKBRep
  cargo:rustc-link-lib=dylib=TKPrim
  cargo:rustc-link-lib=dylib=TKSTEP
  cargo:rustc-link-lib=dylib=TKSTEPAttr
  cargo:rustc-link-lib=dylib=TKSTEPBase
  cargo:rustc-link-lib=dylib=TKSTEP209
  cargo:rustc-link-lib=dylib=TKSTL
  cargo:rustc-link-lib=dylib=TKMesh
  cargo:rustc-link-lib=dylib=TKShHealing
  cargo:rustc-link-lib=dylib=TKFillet
  cargo:rustc-link-lib=dylib=TKBool
  cargo:rustc-link-lib=dylib=TKBO
  cargo:rustc-link-lib=dylib=TKOffset
  cargo:rustc-link-lib=dylib=TKXSBase
  cargo:rustc-link-lib=dylib=user32
  cargo:CXXBRIDGE_PREFIX=opencascade-sys
  cargo:CXXBRIDGE_DIR0=C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\target\debug\build\opencascade-sys-57b6e25be2dec311\out\cxxbridge\include
  cargo:CXXBRIDGE_DIR1=C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\target\debug\build\opencascade-sys-57b6e25be2dec311\out\cxxbridge\crate
  OUT_DIR = Some(C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\target\debug\build\opencascade-sys-57b6e25be2dec311\out)
  TARGET = Some(x86_64-pc-windows-msvc)
  OPT_LEVEL = Some(0)
  HOST = Some(x86_64-pc-windows-msvc)
  cargo:rerun-if-env-changed=VCINSTALLDIR
  VCINSTALLDIR = None
  cargo:rerun-if-env-changed=VSCMD_ARG_VCVARS_SPECTRE
  VSCMD_ARG_VCVARS_SPECTRE = None
  cargo:rerun-if-env-changed=WindowsSdkDir
  WindowsSdkDir = None
  cargo:rerun-if-env-changed=WindowsSDKVersion
  WindowsSDKVersion = None
  cargo:rerun-if-env-changed=LIB
  LIB = None
  cargo:rerun-if-env-changed=PATH
  PATH = Some(C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\target\debug\deps;C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\target\debug;C:\Users\tom\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\java8path;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\dotnet\;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\CMake\bin;C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\12.2 mpacbti-rel1\bin;C:\Program Files\Nordic Semiconductor\nrf-command-line-tools\bin\;C:\msys64\mingw64\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\tom\.cargo\bin;C:\Users\tom\AppData\Local\Programs\Python\Python312\Scripts\;C:\Users\tom\AppData\Local\Programs\Python\Python312\;C:\Program Files\gmosh\bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\dotnet\;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Nordic Semiconductor\nrf-command-line-tools\bin\;C:\Program Files\CMake\bin;C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\12.2 mpacbti-rel1\bin;C:\Users\tom\AppData\Local\Microsoft\WindowsApps;C:\Users\tom\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\tom\.dotnet\tools;C:\Users\tom\AppData\Local\Pandoc\;C:\texlive\2024\bin\windows;C:\msys64\mingw64\bin;C:\Users\tom\.dotnet\tools)
  cargo:rerun-if-env-changed=INCLUDE
  INCLUDE = None
  cargo:rerun-if-env-changed=CXX_x86_64-pc-windows-msvc
  CXX_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CXX_x86_64_pc_windows_msvc
  CXX_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=HOST_CXX
  HOST_CXX = None
  cargo:rerun-if-env-changed=CXX
  CXX = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some(cmpxchg16b,fxsr,sse,sse2,sse3)
  DEBUG = Some(true)
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-pc-windows-msvc
  CXXFLAGS_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_pc_windows_msvc
  CXXFLAGS_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=HOST_CXXFLAGS
  HOST_CXXFLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = None
  OUT_DIR = Some(C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\target\debug\build\opencascade-sys-57b6e25be2dec311\out)
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some(cmpxchg16b,fxsr,sse,sse2,sse3)
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-pc-windows-msvc
  CXXFLAGS_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_pc_windows_msvc
  CXXFLAGS_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=HOST_CXXFLAGS
  HOST_CXXFLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  lib.rs.cc
  C:\OCCT\inc\IMeshTools_ModelBuilder.hxx(50): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
  C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\crates\opencascade-sys/include/wrapper.hxx(103): error C2371: 'Handle_Poly_Triangulation': redefinition; different basic types
  C:\OCCT\inc\Poly_Triangulation.hxx(33): note: see declaration of 'Handle_Poly_Triangulation'
  C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\crates\opencascade-sys/include/wrapper.hxx(104): error C2371: 'Handle_TopTools_HSequenceOfShape': redefinition; different basic types
  C:\OCCT\inc\TopTools_HSequenceOfShape.hxx(24): note: see declaration of 'Handle_TopTools_HSequenceOfShape'
  C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\crates\opencascade-sys/include/wrapper.hxx(303): error C2440: '<function-style-cast>': cannot convert from 'opencascade::handle<Poly_Triangulation> *' to 'std::unique_ptr<Handle_Poly_Triangulation,std::default_delete<Handle_Poly_Triangulation>>'
  C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\crates\opencascade-sys/include/wrapper.hxx(303): note: 'std::unique_ptr<Handle_Poly_Triangulation,std::default_delete<Handle_Poly_Triangulation>>::unique_ptr(const std::unique_ptr<Handle_Poly_Triangulation,std::default_delete<Handle_Poly_Triangulation>> &)': cannot convert argument 1 from 'opencascade::handle<Poly_Triangulation> *' to 'const std::unique_ptr<Handle_Poly_Triangulation,std::default_delete<Handle_Poly_Triangulation>> &'
  C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\crates\opencascade-sys/include/wrapper.hxx(304): note: Reason: cannot convert from 'opencascade::handle<Poly_Triangulation> *' to 'const std::unique_ptr<Handle_Poly_Triangulation,std::default_delete<Handle_Poly_Triangulation>>'
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3382): note: could be 'std::unique_ptr<Handle_Poly_Triangulation,std::default_delete<Handle_Poly_Triangulation>>::unique_ptr(std::auto_ptr<_Other> &&) noexcept'
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3376): note: or       'std::unique_ptr<Handle_Poly_Triangulation,std::default_delete<Handle_Poly_Triangulation>>::unique_ptr(std::unique_ptr<_Ux,_Dx> &&) noexcept'
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3368): note: or       'std::unique_ptr<Handle_Poly_Triangulation,std::default_delete<Handle_Poly_Triangulation>>::unique_ptr(std::unique_ptr<Handle_Poly_Triangulation,std::default_delete<Handle_Poly_Triangulation>> &&) noexcept'
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3365): note: or       'std::unique_ptr<Handle_Poly_Triangulation,std::default_delete<Handle_Poly_Triangulation>>::unique_ptr(Handle_Poly_Triangulation *,std::default_delete<Handle_Poly_Triangulation> &&)'
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3360): note: or       'std::unique_ptr<Handle_Poly_Triangulation,std::default_delete<Handle_Poly_Triangulation>>::unique_ptr(Handle_Poly_Triangulation *,_Dx &&) noexcept'
          with
          [
              _Dx=std::default_delete<Handle_Poly_Triangulation>
          ]
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3356): note: or       'std::unique_ptr<Handle_Poly_Triangulation,std::default_delete<Handle_Poly_Triangulation>>::unique_ptr(Handle_Poly_Triangulation *,const _Dx &) noexcept'
          with
          [
              _Dx=std::default_delete<Handle_Poly_Triangulation>
          ]
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3353): note: or       'std::unique_ptr<Handle_Poly_Triangulation,std::default_delete<Handle_Poly_Triangulation>>::unique_ptr(Handle_Poly_Triangulation *) noexcept'
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3343): note: or       'std::unique_ptr<Handle_Poly_Triangulation,std::default_delete<Handle_Poly_Triangulation>>::unique_ptr(std::nullptr_t) noexcept'
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3340): note: or       'std::unique_ptr<Handle_Poly_Triangulation,std::default_delete<Handle_Poly_Triangulation>>::unique_ptr(void) noexcept'
  C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\crates\opencascade-sys/include/wrapper.hxx(303): note: while trying to match the argument list '(opencascade::handle<Poly_Triangulation> *)'
  C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\crates\opencascade-sys/include/wrapper.hxx(460): error C2440: '<function-style-cast>': cannot convert from 'opencascade::handle<TopTools_HSequenceOfShape> *' to 'std::unique_ptr<Handle_TopTools_HSequenceOfShape,std::default_delete<Handle_TopTools_HSequenceOfShape>>'
  C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\crates\opencascade-sys/include/wrapper.hxx(460): note: 'std::unique_ptr<Handle_TopTools_HSequenceOfShape,std::default_delete<Handle_TopTools_HSequenceOfShape>>::unique_ptr(const std::unique_ptr<Handle_TopTools_HSequenceOfShape,std::default_delete<Handle_TopTools_HSequenceOfShape>> &)': cannot convert argument 1 from 'opencascade::handle<TopTools_HSequenceOfShape> *' to 'const std::unique_ptr<Handle_TopTools_HSequenceOfShape,std::default_delete<Handle_TopTools_HSequenceOfShape>> &'
  C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\crates\opencascade-sys/include/wrapper.hxx(460): note: Reason: cannot convert from 'opencascade::handle<TopTools_HSequenceOfShape> *' to 'const std::unique_ptr<Handle_TopTools_HSequenceOfShape,std::default_delete<Handle_TopTools_HSequenceOfShape>>'
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3382): note: could be 'std::unique_ptr<Handle_TopTools_HSequenceOfShape,std::default_delete<Handle_TopTools_HSequenceOfShape>>::unique_ptr(std::auto_ptr<_Other> &&) noexcept'
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3376): note: or       'std::unique_ptr<Handle_TopTools_HSequenceOfShape,std::default_delete<Handle_TopTools_HSequenceOfShape>>::unique_ptr(std::unique_ptr<_Ux,_Dx> &&) noexcept'
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3368): note: or       'std::unique_ptr<Handle_TopTools_HSequenceOfShape,std::default_delete<Handle_TopTools_HSequenceOfShape>>::unique_ptr(std::unique_ptr<Handle_TopTools_HSequenceOfShape,std::default_delete<Handle_TopTools_HSequenceOfShape>> &&) noexcept'
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3365): note: or       'std::unique_ptr<Handle_TopTools_HSequenceOfShape,std::default_delete<Handle_TopTools_HSequenceOfShape>>::unique_ptr(Handle_TopTools_HSequenceOfShape *,std::default_delete<Handle_TopTools_HSequenceOfShape> &&)'
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3360): note: or       'std::unique_ptr<Handle_TopTools_HSequenceOfShape,std::default_delete<Handle_TopTools_HSequenceOfShape>>::unique_ptr(Handle_TopTools_HSequenceOfShape *,_Dx &&) noexcept'
          with
          [
              _Dx=std::default_delete<Handle_TopTools_HSequenceOfShape>
          ]
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3356): note: or       'std::unique_ptr<Handle_TopTools_HSequenceOfShape,std::default_delete<Handle_TopTools_HSequenceOfShape>>::unique_ptr(Handle_TopTools_HSequenceOfShape *,const _Dx &) noexcept'
          with
          [
              _Dx=std::default_delete<Handle_TopTools_HSequenceOfShape>
          ]
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3353): note: or       'std::unique_ptr<Handle_TopTools_HSequenceOfShape,std::default_delete<Handle_TopTools_HSequenceOfShape>>::unique_ptr(Handle_TopTools_HSequenceOfShape *) noexcept'
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3343): note: or       'std::unique_ptr<Handle_TopTools_HSequenceOfShape,std::default_delete<Handle_TopTools_HSequenceOfShape>>::unique_ptr(std::nullptr_t) noexcept'
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory(3340): note: or       'std::unique_ptr<Handle_TopTools_HSequenceOfShape,std::default_delete<Handle_TopTools_HSequenceOfShape>>::unique_ptr(void) noexcept'
  C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\crates\opencascade-sys/include/wrapper.hxx(460): note: while trying to match the argument list '(opencascade::handle<TopTools_HSequenceOfShape> *)'
  C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\target\debug\build\opencascade-sys-57b6e25be2dec311\out\cxxbridge\sources\opencascade-sys\src\lib.rs.cc(552): error C2440: 'initializing': cannot convert from 'const T &(__cdecl *)(const opencascade::handle<T> &)' to 'const TopTools_HSequenceOfShape &(__cdecl *)(const Handle_TopTools_HSequenceOfShape &)'
  C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\target\debug\build\opencascade-sys-57b6e25be2dec311\out\cxxbridge\sources\opencascade-sys\src\lib.rs.cc(552): note: None of the functions with this name in scope match the target type
  C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\target\debug\build\opencascade-sys-57b6e25be2dec311\out\cxxbridge\sources\opencascade-sys\src\lib.rs.cc(1964): error C2440: 'initializing': cannot convert from 'const T &(__cdecl *)(const opencascade::handle<T> &)' to 'const Poly_Triangulation &(__cdecl *)(const Handle_Poly_Triangulation &)'
  C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\target\debug\build\opencascade-sys-57b6e25be2dec311\out\cxxbridge\sources\opencascade-sys\src\lib.rs.cc(1964): note: None of the functions with this name in scope match the target type
  C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\target\debug\build\opencascade-sys-57b6e25be2dec311\out\cxxbridge\sources\opencascade-sys\src\lib.rs.cc(2056): error C2440: 'initializing': cannot convert from 'void (__cdecl *)(const TopoDS_Face &,const opencascade::handle<Poly_Triangulation> &)' to 'void (__cdecl *)(const TopoDS_Face &,const Handle_Poly_Triangulation &)'
  C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\target\debug\build\opencascade-sys-57b6e25be2dec311\out\cxxbridge\sources\opencascade-sys\src\lib.rs.cc(2056): note: None of the functions with this name in scope match the target type

  --- stderr
  CMake Warning (dev) at C:/OCCT/cmake/OpenCASCADEConfig.cmake:47:
    Syntax Warning in cmake code at column 75

    Argument not separated from preceding token by whitespace.
  Call Stack (most recent call first):
    CMakeLists.txt:7 (find_package)
  This warning is for project developers.  Use -Wno-dev to suppress it.


  CXX include path:
    C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\target\debug\build\opencascade-sys-57b6e25be2dec311\out\cxxbridge\include
    C:\Users\tom\Downloads\opencascade-rs-main\opencascade-rs-main\target\debug\build\opencascade-sys-57b6e25be2dec311\out\cxxbridge\crate


  error occurred: Command "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.40.33807\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-Z7" "-Brepro" "-I" "C:\\Users\\tom\\Downloads\\opencascade-rs-main\\opencascade-rs-main\\target\\debug\\build\\opencascade-sys-57b6e25be2dec311\\out\\cxxbridge\\include" "-I" "C:\\Users\\tom\\Downloads\\opencascade-rs-main\\opencascade-rs-main\\target\\debug\\build\\opencascade-sys-57b6e25be2dec311\\out\\cxxbridge\\crate" "-I" "C:\\Users\\tom\\Downloads\\opencascade-rs-main\\opencascade-rs-main\\crates" "-I" "C:/OCCT/inc" "-I" "include" "-W4" "-D_USE_MATH_DEFINES=TRUE" "-FoC:\\Users\\tom\\Downloads\\opencascade-rs-main\\opencascade-rs-main\\target\\debug\\build\\opencascade-sys-57b6e25be2dec311\\out\\62d7881a027d02da-lib.rs.o" "-c" "C:\\Users\\tom\\Downloads\\opencascade-rs-main\\opencascade-rs-main\\target\\debug\\build\\opencascade-sys-57b6e25be2dec311\\out\\cxxbridge\\sources\\opencascade-sys\\src\\lib.rs.cc" with args cl.exe did not execute successfully (status code exit code: 2).
@bschwind
Copy link
Owner

Hey, sorry for the late reply on this!

I don't test regularly on Windows so unfortunately it is the least supported platform at the moment. From the error message, it seems possible you have an older or newer cmake version. What do you get for cmake --version?

I have cmake version 3.22.0, for example.

As another hint, this project is currently using OpenCascade 7.7.1

I can't claim to support a version different than that one at the moment. Currently it's quite a pain to upgrade because the actual source code for occt often goes over the 10MB crate limit for crates.io, without aggressive pruning of unneeded source files. I don't want to go through that process again until I have a better strategy for either pruning files, or splitting things into smaller crates.

@Markussp256
Copy link

Markussp256 commented Jul 31, 2024

I could not find OpenCascade 7.7.1 just 7.7.0 on https://dev.opencascade.org/release/previous

@bschwind
Copy link
Owner

You can try with 7.7.0, but I can't guarantee it'll work.

@TCWilliamson
Copy link
Author

Sorry for not getting back on this - I've been drowned in work that I'm nearly wrapping up now for a customer. I hope to pick this up again shortly and give it a spin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants