How to use native library directly without binding?

Chang Guangyu 1 Reputation point
2022-11-07T08:30:32.073+00:00

I have a native library built by Delphi, which is DLL on windows, dylib on Mac, .a on iOS and .so on Android.
I tested using DllImport attribute on Windows.
But what project folder structure should I put into theses libraries when I build cross platform app?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,868 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 68,571 Reputation points Microsoft Vendor
    2022-11-08T09:48:54.593+00:00

    Hello,

    How to use native library directly without binding?

    You cannot use native library without binding, because native libraries were written by different developed languages, you need to bind libraries, convert other developed languages to C#, you can use it in your MAUI project.

    I find a video about Binding Native Libraries for .NET MAUI - Events | Microsoft Learn, you can refer to it.

    Best Regards,

    Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.