How to compile C# application with C++ static library?

后端 未结 4 1924
谎友^
谎友^ 2020-12-01 15:56

I turned my C++ Dynamic link library into Static library just to acquire more knowledge. My question is how can I use the .obj file to compile both projects with C# express/

4条回答
  •  一生所求
    2020-12-01 16:39

    The way to "use" a static library in C# is to first create a Managed C++ wrapper that will provide a facade for the rest of the managed world. As everyone else has already commented, C# only supports DLLs for P/Invoke.

提交回复
热议问题