mono / CppSharp

Tools and libraries to glue C/C++ APIs to high-level languages
MIT License
3.12k stars 513 forks source link

Is CppSharp ready for .NET standards 2.0 for UWP? #874

Closed JimSEOW closed 5 years ago

JimSEOW commented 7 years ago

UWP will reach .NET standard 2.0 by perhaps Q4 2017.

Why is this relevant to CppSharp?

Right now, there is no "Non Commercial" .NET wrapper for UWP OpenCV (e.g. 3.1)

The key .NET OpenCVSharp abandon the effort to .NET wrap OpenCV for UWP.

However, with .NET standard 2.0, the technical challenges are likely to remove as the what work (wrap- able) in non UWP (e.g. WPF or WinForm), will likely be similar through .NET standards 2.0 for UWP.

Are CppSharp community Ready for the possibilities of .NET standards 2.0 for UWP?

Perhaps someone already found a Non Commercial solution (beside EMGU) for .NET OpenCV UWP?

realvictorprm commented 7 years ago

I guess it's only partly compatible. Some manual changes must be done.

Am 27.06.2017 00:29 schrieb "JimSw2016" notifications@github.com:

UWP will reach .NET standard 2.0 by perhaps Q4 2017.

Why is this relevant to CppSharp?

Right now, there is no "Non Commercial" .NET wrapper for UWP OpenCV (e.g. 3.1)

The key .NET OpenCVSharp abandon the effort to .NET wrap OpenCV for UWP.

However, with .NET standard 2.0, the technical challenges are likely to remove as the what work (wrap- able) in non UWP (e.g. WPF or WinForm), will likely be similar through .NET standards 2.0 for UWP.

Are CppSharp community Ready for the possibilities of .NET standards 2.0 for UWP?

Perhaps someone already found a Non Commercial solution (beside EMGU) for .NET OpenCV UWP?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mono/CppSharp/issues/874, or mute the thread https://github.com/notifications/unsubscribe-auth/AYPM8KQumboCdiMtKrCBfPjAUKxejkIRks5sIDDfgaJpZM4OF7u2 .

tritao commented 7 years ago

I don't really understand the question here. Are you asking if CppSharp generated code is compatible with .NET standard 2.0?

realvictorprm commented 7 years ago

I guess so @tritao

JimSEOW commented 7 years ago

@tritao I wonder if there is an option for user to choose to create output that is .NET standard 2.0 compliance or not. A feature request.

tritao commented 7 years ago

We'll gladly create an option if needed, but first someone needs to actually try to use the generated code with .NET Standard 2.0 and tell us what needs to be fixed.

damageboy commented 7 years ago

I know that it used to work (The generated .cs wrappers) with .net core 1.x for a rater complex C++ project.

tritao commented 5 years ago

The generated code seems to be usable from .NET Standard. Please re-open if there's a specific issue you'd like us to look at.

meirkr commented 5 years ago

Hi In case the generated code is managed C++ (CLI/CLR) project, I think it won't be supported as .NET core/standard don't support such projects. Only .NET framework does.

But if it wrapps the C++ code including classes, constructors, etc kind of C static functions, and maybe wraps them in generated C# classes which actually use all those functions internally (pInvoke), then it could be possible.

Does it work in one of those ways? Maybe you can point us to some github project or other link which can show the generated code behavior?

tritao commented 5 years ago

Hi @meirkr. You are right, .NET Core does not support C++/CLI yet. I think it will be supported for .NET Core 3 (mixed-mode assemblies) but only on Windows.

CppSharp C# backend does not rely on an intermediate C layer, but on the details of the particular C++ ABI being targeted, using only P/Invoke for C++ interop.