【发布时间】:2018-08-05 05:43:32
【问题描述】:
嗨,我对 dllexport 有点困惑。例如,当我在课堂上使用 __declspec( dllexport ) 时
#define DllExport __declspec( dllexport )
class DllExport C {
int i;
virtual int func( void ) { return 1; }
};
我是将 C 类导出到 dll 文件还是从 dll 文件导出 C 类?
【问题讨论】:
-
希望 MSDN dllexport, dllimport 信息有所帮助。
-
通常你使用一个宏,它在编译 dll 时在
__declspec( dllexport )和使用 dll 时在__declspec( dllimport )之间切换。像这样:stackoverflow.com/questions/14980649/…