[vtkusers] QVTKWidget linking problem

Jim jiksed at yahoo.com
Wed Mar 11 17:08:33 EDT 2009


Dear vtkusers,
 
Thank you all for your help. I built VTK 5.2.1 in VS2008 Pro and all examples, including three Qt examples, run successfully. I added QVTKWidget plugin to Qt Toolbox in VS2008. One thing I learned is that you can't add QVTKWidget plugin to Qt Toolbox if you build VTK with Qt 4.5.0. VS Integration 1.4.3 does not recognize any widget plugin built with Qt 4.5.0 which is newer than VS Integ 1.4.3.
 
Now I am building a "Hello World" example in VS 2008 with Qt integration. Here is my system configuration:
 
1) New Project --> Qt Projects --> Qt Application
2) Project Name: AddressBook, then click Finish button
3) Build F7. Everything went OK and I saw a blank main window on the screen.
4) Drag and drop a QVTKWidget on QMainWindow
5) F5 or F7
6) I got the following 35 error message.
 
I tried including all kinds of QVTKWidget stuffs to my project but all failed. What is wrong?
 
Thank you.
Jim
 
---------------------------- 
1>------ Build started: Project: AddressBook, Configuration: Debug Win32 ------
1>Compiling...
1>addressbook.cpp
1>main.cpp
1>Generating Code...
1>Compiling...
1>moc_addressbook.cpp
1>Linking...
1>addressbook.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QVTKWidget::QVTKWidget(class QWidget *,class QFlags<enum Qt::WindowType>)" (__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) referenced in function "public: void __thiscall Ui_AddressBookClass::setupUi(class QMainWindow *)" (?setupUi at Ui_AddressBookClass@@QAEXPAVQMainWindow@@@Z)
1>addressbook.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall QVTKWidget::metaObject(void)const " (?metaObject at QVTKWidget@@UBEPBUQMetaObject@@XZ)
1>addressbook.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall QVTKWidget::qt_metacast(char const *)" (?qt_metacast at QVTKWidget@@UAEPAXPBD at Z)
1>addressbook.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall QVTKWidget::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall at QVTKWidget@@UAEHW4Call at QMetaObject@@HPAPAX at Z)
1>addressbook.obj : error LNK2001: unresolved external symbol "protected: virtual bool __thiscall QVTKWidget::event(class QEvent *)" (?event at QVTKWidget@@MAE_NPAVQEvent@@@Z)
1>addressbook.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QVTKWidget::mousePressEvent(class QMouseEvent *)" (?mousePressEvent at QVTKWidget@@MAEXPAVQMouseEvent@@@Z)
.......
.......
1>addressbook.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QVTKWidget::~QVTKWidget(void)" (__imp_??1QVTKWidget@@UAE at XZ) referenced in function "public: virtual void * __thiscall QVTKWidget::`scalar deleting destructor'(unsigned int)" (??_GQVTKWidget@@UAEPAXI at Z)
1>C:\Documents and Settings\tiger\My Documents\Visual Studio 2008\Projects\AddressBook\Debug\AddressBook.exe : fatal error LNK1120: 34 unresolved externals
1>Build log was saved at "file://c:\Documents and Settings\tiger\My Documents\Visual Studio 2008\Projects\AddressBook\AddressBook\Debug\BuildLog.htm"
1>AddressBook - 35 error(s), 0 warning(s)
 


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090311/4fce2922/attachment.htm>


More information about the vtkusers mailing list