0
정적 오류 정적에정적 멤버 변수 수출
test2.dll에서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;
...
, "확인되지 않은 외부 기호"CTest1 : NUM. 하지만 앱에는 문제가 없습니다.
BTW : CTest1의 다른 기능을 사용하면 문제가 없습니다.
도와 주셔서 감사합니다.
왜 'extern' 키워드를 사용하지 않습니까? –