How to reference a .lib file in c# UWP Project RRS feed

  • Question

  • Hi 

         I am working on a Universal Windows (UWP) App. I am integrating a Native C++ Static library (.lib) to my C# project in UWP. I will get only the header files (in include folder) and .lib file (in lib folder). I don't have access to import source.cpp files.
         In this case how do I refer the APIs written in C++ in .lib file to my C# UWP project.

    Thanks in Advance
    With Regards
    Thursday, April 2, 2020 8:06 AM

All replies

  • Hi Gokul_P_Guna,

    Welcome to MSDN forum.

    I suggest you could wrap that C++ logic using a WinRT component, and go to file properties window to set build actions as content, and then reference this component in uwp application.

    Please refer more info here: https://stackoverflow.com/a/33490707/11557747 

    Best Regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, April 3, 2020 3:16 AM