Re: Cross platform C++ and C#

William S Fulton <[email protected]> Sat, 30 Jan 2021 18:10:47 +0000
Newsgroups gmane.comp.programming.swig
Message-ID <CANGqftAMz3R4ArzR9u8SKbwumxnN+es3JV_Xz0z1Xr04kxiVHg@mail.gmail.com>
SWIG will generate the same output given the same inputs on different
operating systems, so it is possible to generate the SWIG C# and C++
wrappers on one platform for use on another platform. How you compile the
generated C++ code for a different platform depends on what platforms you
want to target. gcc can cross compile from Windows to Linux for example.
Visual Studio just compiles for Windows, so not exactly cross platform
unless you consider compiling on x64 and targeting x86 as cross-platform.

William

On Fri, 29 Jan 2021 at 09:40, Rui Oliveira <[email protected]> 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