对于给定的类构造函数和析构函数,我收到一个非常奇怪的错误.请帮我解决这个问题.
架构i386的未定义符号:
"vtable for A",referenced from: A::A() in A.o A::~MissionController() in A.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. ld: symbol(s) not found for architecture i386 clang: error: linker command Failed with exit code 1 (use -v to see invocation)
代码片段
.h文件:
class A: public B public: A(); ~A(); };
.cpp文件..
A::A() { } A::~A() { }