12345678910111213141516171819202122 |
- #ifndef __WIN32_DLL_20180622__
- #define __WIN32_DLL_20180622__
- #ifdef WIN32DLL_EXPORTS
- #define MYDLL_API _declspec(dllexport) // 导出dll函数,供外部使用;
- #else
- #define MYDLL_API _declspec(dllimport) // 导出dll函数,供dll内部使用;
- #endif // NONMFCDLL_EXPORTS
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- MYDLL_API int add(int a, int b); // 缺省调用约定:__cdecl(项目本身调用约定)
- MYDLL_API int add2(int a, int b); // 缺省调用约定:__cdecl(项目本身调用约定)
- MYDLL_API int g_result;
- #ifdef __cplusplus
- };
- #endif
- #endif //__WIN32_DLL_20180622__
|