16,473
社区成员
发帖
与我相关
我的任务
分享
1、extern "C"__declspec(dllexport) int __stdcall Fun(int a, int b)
2、__declspec(dllexport) int __stdcall Fun(int a, int b) // 不带 extern "C"
extern "C"__declspec(dllexport) int __cdecl Fun(int a, int b)
#pragma comment(linker, "/EXPORT:test")
extern "C" int __stdcall test()
{
return 0;
}
1、int __stdcall Fun(int a, int b) // __declspec(dllexport) 不用加了
2、然后在.def文件中加入Fun就可以了
EXPORTS
; Explicit exports can go here
Fun
以C语言方式编译
你的干净的是指这样? 以C语言方式编译
__declspec(dllexport)__stdcall Fun(int a, int b) 然后在.def文件中的; Explicit exports can go here下面加入Fun就可以了 EXPORTS ; Explicit exports can go here Fun