送分贴~~ 解决马上揭贴
如何在vc的dll工程里自定义一个导出类
我在头文件中声明 :
#define DllExport _declspec(dllexport)
DllExport class Expclass
{
...........
}
然后在类的.cpp文件里象非dll工程一样:
class Expclass
{
}
编译错误:
f:\vpn\testprojects\expclass\declfun.h(17) : warning C4091: '__declspec(dllexport ) ' : ignored on left of 'class Expclass' when no variable is declared
F:\VPN\TestProjects\Expclass\ExpclassImp.cpp(3) : warning C4091: 'extern ' : ignored on left of 'class Expclass' when no variable is declared
F:\VPN\TestProjects\Expclass\ExpclassImp.cpp(5) : error C2011: 'Expclass' : 'class' type redefinition
Error executing cl.exe.
还有那个warning 什么意思的???????????????????????谢谢~~~