0
静态误差:静态成员变量出口
in test1.dll:
xxx.h
class AFX_EXT_CLASS CTest1
{
static int num;
}
xxx.cpp
int CTest1::num = 0;
in a cpp of test2.dll: test2 is dependent test1.dll
...
int i = CTest1::num;
...
in a cpp of App: App is dependent test1.dll & test2.dll
...
int i = CTest1::num;
...
在test2.dll
“未解析的外部符号” 静态:CTest1 :: NUM。 但在App中,没问题。
顺便说一句:如果我使用CTest1的其他功能,没问题。
帮助我,非常感谢。
为什么不使用'extern'关键字? – 2013-04-29 14:35:25