dotnet C# and C++ on Linux

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

dotnet C# and C++ on Linux

Ian Leonard
I'm using dotnet on Linux and have created a shared library (written in C) that I can use in a program written in C#. But what I really need is to write the library in C++. This is obviously harder and I can't find information and examples of how to do this (I'm new to swig). Can anyone point me in the right direction? Thanks.

--
Ian

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Reply | Threaded
Open this post in threaded view
|

Re: dotnet C# and C++ on Linux

William S Fulton


On 18 January 2017 at 13:22, Ian Leonard <[hidden email]> wrote:

I'm using dotnet on Linux and have created a shared library (written in C) that I can use in a program written in C#. But what I really need is to write the library in C++. This is obviously harder and I can't find information and examples of how to do this (I'm new to swig). Can anyone point me in the right direction? Thanks.
 
SWIG will wrap C or C++ code, so you don't have to use C++. You need to understand C to use SWIG for wrapping C code and you need to understand C++ when using SWIG to wrap C++ code. If you don't know C++, then either learn some basics or stay with C. There are lots of examples for using C++ with SWIG in the Examples/C++ directory and in the documentation.

William

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user