Ошибки компоновщика GCC C ++: неопределенная ссылка на vtable for XXX, неопределенная ссылка на ClassName :: ClassName ()
Я настраиваю проект C ++, на Ubuntu x64, используя Eclipse-CDT. Я в основном делаю привет и делаю ссылки на коммерческую стороннюю библиотеку.
Я включил заголовочные файлы, связанные с их библиотеками, но я все еще получаю ошибки компоновщика. Есть ли здесь какие-то возможные проблемы, кроме очевидных (например, я на 99% уверен, что я ссылаюсь на правильную библиотеку).
Is there a way to confirm the static libraries I am linking to are 64bit? Is there a way to confirm that the library has the class (and methods) I am expecting it to have?Затмение говорит:
Building target: LinkProblem Invoking: GCC C++ Linker g++ -L/home/notroot/workspace/somelib-3/somelib/target/bin -o"LinkProblem" ./src/LinkProblem.o -lsomelib1 -lpthread -lsomelib2 -lsomelib3 ./src/LinkProblem.o: In function `main': /home/notroot/workspace/LinkProblem/Debug/../src/LinkProblem.cpp:17: undefined reference to `SomeClass::close()' ./src/LinkProblem.o: In function `SomeOtherClass': /home/notroot/workspace/somelib-3/somelib/include/sql/somefile.h:148: undefined reference to `SomeClass::SomeClass()' /home/notroot/workspace/somelib-3/somelib/include/sql/somefile.h:148: undefined reference to `vtable for SomeOtherClass' /home/notroot/workspace/somelib-3/somelib/include/sql/somefile.h:151: undefined reference to `SomeClass::~SomeClass()' ./src/LinkProblem.o: In function `~SomeOtherClass': /home/notroot/workspace/somelib-3/somelib/include/sql/somefile.h:140: undefined reference to `vtable for SomeOtherClass' /home/notroot/workspace/somelib-3/somelib/include/sql/somefile.h:140: undefined reference to `SomeClass::~SomeClass()' /home/notroot/workspace/somelib-3/somelib/include/sql/somefile.h:140: undefined reference to `SomeClass::~SomeClass()' collect2: ld returned 1 exit status make: *** [LinkProblem] Error 1