Export dll method from C++ to C#. Why I need: “ extern ”C“ ”

后端 未结 4 1294
隐瞒了意图╮
隐瞒了意图╮ 2021-01-17 11:31

In my dll there is a method that I want to export.

//Works:

extern \"C\" __declspec(dllexport)

//Wont work

__declsp         


        
4条回答
  •  孤独总比滥情好
    2021-01-17 12:07

    The compiler normally decorates your exported names to include information about class and signature. extern "C" tells the compiler not to do that.

提交回复
热议问题