#include <iostream> using namespace std; namespace HW { class test { public: test(); virtual ~test(); }; test::test() { cout << "FFF" << endl; } }; int main() { return 0; } これをコンパイルできません。 どうしてですか?
/tmp/ccsyUc0A.o: In function `HW::test::test()': samp174.cpp:(.text+0x12d): undefined reference to `vtable for HW::test' /tmp/ccsyUc0A.o: In function `HW::test::test()': samp174.cpp:(.text+0x163): undefined reference to `vtable for HW::test' collect2: ld returned 1 exit status