Hello,
I want to create a c++ library that uses some features of Hoops Exchange, like importing a file and converting it to other format. This library will be consumed by a C# application (.net core application) using P/Invoke.
This application will run in a docker container that uses Linux operating system (ubuntu).
Quick question:
Can I build this c++ library on Visual Studio 2022 using my windows machine and then can I put these binaries on linux? Do I will need to download the “Microsoft Visual C++ Redistributable” on linux? Which Hoops Exchange binaries do I need to use, windows or linux? When I am creating this linux docker image, how I can compile and build this c++ library?
Details:
-
I first started using Visual Studio 2022 to create a visual c++ project (vcxproj extension). Then I created a C# application (.net core) with a reference to this vcproj project. It works and it runs in my windows machine. But when I tried to deployed it to a linux docker container it failed. It fails when I do “dotnet build”. Linux does not support vcxproj. Because “dotnet” is cross platform, it works for .net core applications but it does not support C++/CLI.
-
We can see in this link, Linux does not support C++/CLI, C++/CLI migration to .Net core on Linux · Issue #2508 · dotnet/core · GitHub
-
So now I am trying using CMAKE, to build this c++ library on the docker image, using Hoops Exchange binaries.
But I am not 100% sure I am following the correct path. Is there a way I can build this c++ library on Visual Studio and them a way to create a linux docker image that can use it?
Thank you.
I wish you a merry Christmas and happy new year.
Alberto