【发布时间】:2008-12-17 06:04:13
【问题描述】:
简单地说:
foo.h:
#include "bar.h"
class foo {
private:
bar it;
void DoIt();
}
bar.h:
class bar {
public:
void Test();
}
foo.cpp:
void foo::DoIt() {
it.Test();
}
这将导致:
错误 LNK2001:无法解析的外部符号
为什么?
【问题讨论】:
-
因用户发布自己问题的答案而关闭。
标签: c++ class linker external-dependencies