动态链接库问题
以下代码编译时老报错
#ifdef MyDll_EXPORTS
#define DllAPI_declspec(dllexport)
#else
#define DllAPI_declspec(dllimport)
extern "C"
{
DllAPI int _stdcall int Max(int a,int b);
}
#endif
错误如下:
mydll.h(7) : error C2144: syntax error : missing ';' before type 'int'
mydll.h(7) : error C2501: 'DllAPI' : missing storage-class or type specifiers
mydll\mydll.h(7) : fatal error C1004: unexpected end of file found