[vtkusers] undefined reference to 'QVTKWidget::QVTKWidget'
Yifei Li
yifli at mtu.edu
Fri Mar 20 21:32:21 EDT 2009
The undefined reference error occurred in ui_vtkgui.h (qvtkwidget = new QVTKWidget(someParentWidget)), which is automatically generated by qt/eclipse integration.
The other function qvtkwidget->GetRenderWindow() does not cause any linking error.
If I remove -lQVTK from 'LIBS', I'll get another linking error:
undefined reference to 'QVTKWidget::GetRenderWindow()'
So I think the dynamic library libQVTK.so must be linked, at least partially. I checked the symbols defined in libVTK.so using 'nm' command and confirmed myself 'QVTKWidget' is
indeed defined:
0000b4d0 T _ZN10QVTKWidgetD0Ev
0000b560 T _ZN10QVTKWidgetD1Ev
0000b5e0 T _ZN10QVTKWidgetD2Ev
00015a40 V _ZTI10QVTKWidget
00012034 V _ZTS10QVTKWidget
00015800 V _ZTV10QVTKWidget
0000b4c0 T _ZThn40_N10QVTKWidgetD0Ev
0000b550 T _ZThn40_N10QVTKWidgetD1Ev
I'm running out of ideas. Who can help?
Yifei
----- Original Message -----
From: "Yifei Li" <yifli at mtu.edu>
To: vtkusers at vtk.org
Sent: Friday, March 20, 2009 3:02:55 PM GMT -05:00 US/Canada Eastern
Subject: [vtkusers] undefined reference to 'QVTKWidget::QVTKWidget'
Hi all,
I'm trying to compile an example of Qt4 and VTK integration -
SimpleView. Although I included all the libraries (I use qmake):
LIBS += -L/usr/lib \
-lQVTK \
-lvtkHybrid \
-lvtkVolumeRendering \
-lvtkIO \
-lvtkRendering \
-lvtkGenericFiltering \
-lvtkGraphics \
-lvtkImaging \
-lvtkFiltering \
-lvtkCommon \
-lvtkftgl \
-lvtkDICOMParser \
-lvtksys
compilation still failed with the error message:
debug/vtkgui.o: In function `Ui_MainWindow::setupUi(QMainWindow*)':
undefined reference to `QVTKWidget::QVTKWidget(QWidget*,
QFlags<Qt::WindowType>)'
Any Ideas? Thanks in advance
Yifei
P.S. Development Environment:
OS: Fedora 9
IDE: Eclipse 3.3.2
Compiler: g++ 4.3
Qt: 4.3
Qt/Eclipse integration for qt-4.5.0
VTK: 5.0
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list