[vtkusers] libQVTK.so: undefined reference
agupta
adityargupta at gmail.com
Wed Nov 17 12:23:37 EST 2010
Hello all,
I am using VTK 5.6 on a CentOS linux 64 bit machine. I am developing a gui
using C++, VTK and QT (Qt 4.6.2). When I run make, I do not receive any
compilation errors but I receive the following linking errors:
Linking CXX executable bin/KrabbeQtITK
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QAbstractUriResolver::metaObject() const'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QXmlQuery::bindVariable(QString const&, QXmlItem const&)'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `typeinfo for QAbstractMessageHandler'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QXmlQuery::setMessageHandler(QAbstractMessageHandler*)'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QSourceLocation::line() const'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QAbstractMessageHandler::qt_metacast(char const*)'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QAbstractMessageHandler::QAbstractMessageHandler(QObject*)'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QAbstractMessageHandler::qt_metacall(QMetaObject::Call, int,
void**)'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QAbstractUriResolver::qt_metacast(char const*)'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QXmlQuery::evaluateTo(QIODevice*) const'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QAbstractMessageHandler::~QAbstractMessageHandler()'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QXmlItem::QXmlItem(QVariant const&)'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `typeinfo for QAbstractUriResolver'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QXmlQuery::setUriResolver(QAbstractUriResolver const*)'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QXmlQuery::setQuery(QIODevice*, QUrl const&)'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QAbstractMessageHandler::metaObject() const'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QXmlQuery::~QXmlQuery()'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QXmlQuery::QXmlQuery(QXmlQuery::QueryLanguage, QXmlNamePool
const&)'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QAbstractUriResolver::~QAbstractUriResolver()'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QXmlNamePool::~QXmlNamePool()'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QXmlItem::~QXmlItem()'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QSourceLocation::uri() const'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QXmlQuery::setFocus(QIODevice*)'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QXmlNamePool::QXmlNamePool()'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QAbstractUriResolver::QAbstractUriResolver(QObject*)'
/tools/VTK/VTK_5.6/VTK_5.6_linux64_dyn/lib/vtk-5.6/libQVTK.so: undefined
reference to `QAbstractUriResolver::qt_metacall(QMetaObject::Call, int,
void**)'
collect2: ld returned 1 exit status
make[2]: *** [bin/KrabbeQtITK] Error 1
make[1]: *** [CMakeFiles/KrabbeQtITK.dir/all] Error 2
make: *** [all] Error 2
***********************************************************************************
In my code #include "QVTKWidget.h" calls this library and results in the
linking errors. In my CMakelists file, I include the following libraries:
TARGET_LINK_LIBRARIES(KrabbeQtITK QVTK ${ITK_LIBRARIES} ${VTK_LIBRARIES}
${QT_LIBRARIES} ${QT_QTDBUS_LIBRARY})
I'm using CMake version 3.8. Any hints on how I can fix this issue?
Thanks.
Regards,
agupta
--
View this message in context: http://vtk.1045678.n5.nabble.com/libQVTK-so-undefined-reference-tp3269450p3269450.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list