Re: Cross platform C++ and C#

Rokas Kupstys via Swig-user <[email protected]> Sat, 30 Jan 2021 09:08:26 +0200
Newsgroups gmane.comp.programming.swig
Message-ID <[email protected]>
Hey Rui,

Path i have taken is to generate bindings for every platform during 
build. This means that during build process i have to build a native 
version of SWIG for current host that is performing a build. I do this 
by building current project as cmake external project and i use a native 
toolchain instead of current crosscompiler. This gives me a native 
version of SWIG that can produce bindings during crosscompiling. However 
if you do not use a custom SWIG version it would be enough for you to 
invoke SWIG installed on the system.

Relevant build script: 
https://github.com/rokups/rbfx/blob/master/Source/CMakeLists.txt#L31-L54

-- Rokas Kupstys

On 2021-01-29 11:39, Rui Oliveira wrote:
> Greetings!
>
> You probably have this already figured out so I'll ask here:
>
> How do you do cross-platform C++/C# interop?
>
> I mean,  with .net 5 (both CLI and with Visual Studio) I can publish 
> targeting whatever platform from my platform (Windows). But would you 
> integrate cross compiling the C++ part? Like, without having to 
> manually build (cross compile) the C++ libraries , and the SWIG 
> interface and copy files over... Ideally all part of the VS solution? 
> Or maybe with Cmake? But I'd like to keep the ability to have the 
> preview editor, hot reload, that sorta stuff...
>
>
> Thanks!
> Rui
>
>
>
> _______________________________________________
> Swig-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/swig-user



_______________________________________________
Swig-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swig-user