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

Adding SWIG support for C# #14

Open
tranlm opened this issue Jul 23, 2024 · 0 comments
Open

Adding SWIG support for C# #14

tranlm opened this issue Jul 23, 2024 · 0 comments

Comments

@tranlm
Copy link

tranlm commented Jul 23, 2024

Hi all,

Great job on this project. I'm trying to update the cmakelist.txt file to create C# bindings using SWIG (appended code pasted below). However, everytime I try to build the project, I get the following error:

C:\GitHub\EasyOCR-cpp\build>cmake --build . --config Release
MSBuild version 17.10.4+10fbfbf2e for .NET Framework

  1>Checking Build System
  Swig compile src/TorchModel.i for csharp
..\include\CRAFT.h(29): warning 503: Can't wrap 'operator ()' unless renamed to a valid identifier. [C:\GitHub\EasyOCR-
cpp\build\TorchModel.vcxproj]
..\include\CRAFT.h(37): warning 503: Can't wrap 'operator ()' unless renamed to a valid identifier. [C:\GitHub\EasyOCR-
cpp\build\TorchModel.vcxproj]
  Building Custom Rule C:/GitHub/EasyOCR-cpp/CMakeLists.txt
  TorchModelCSHARP_wrap.cxx
C:\GitHub\EasyOCR-cpp\build\CMakeFiles\TorchModel.dir\TorchModelCSHARP_wrap.cxx(625,17): error C2512: 'c10::Device': no
 appropriate default constructor available [C:\GitHub\EasyOCR-cpp\build\TorchModel.vcxproj]
C:\GitHub\EasyOCR-cpp\build\CMakeFiles\TorchModel.dir\TorchModelCSHARP_wrap.cxx(642,17): error C2512: 'c10::Device': no
 appropriate default constructor available [C:\GitHub\EasyOCR-cpp\build\TorchModel.vcxproj]

I've tried to update the code to exclude c10::Device from the SWIG Wrapping, but have been unsuccessful. Was wondering if you could add the support for this.

Thanks!

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

1 participant