<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>&nbsp;</DIV>
<DIV>I solved this problem by myself by adding QVTK.lib to Linker | Input | Additional Dependencies. However, there are two new problems:</DIV>
<DIV>&nbsp;</DIV>
<DIV>1) From Release Build, QVTKWidget won't refresh, i.e., it captures some random screen image and stays unchaged. Three Qt-VTK examples (release build) run without any issues.</DIV>
<DIV>2) Debug Build won't run (nothing pops up on the screen). This same problem happened to three Qt-VTK examples.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I am sure I have right PATH and VC++ Directories (Include files and library files) for both VKT and Qt. What am I missing here?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you.</DIV>
<DIV><BR><BR>--- On <B>Wed, 3/11/09, Jim <I>&lt;jiksed@yahoo.com&gt;</I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: Jim &lt;jiksed@yahoo.com&gt;<BR>Subject: [vtkusers] QVTKWidget linking problem<BR>To: "VTK" &lt;vtkusers@vtk.org&gt;<BR>Date: Wednesday, March 11, 2009, 3:08 PM<BR><BR>
<DIV id=yiv1740895657>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>Dear vtkusers,</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Consolas size=3></FONT>&nbsp; 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>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&nbsp;built with Qt 4.5.0 which is newer than VS Integ 1.4.3.</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Consolas size=3></FONT>&nbsp; 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>Now I am building a "Hello World" example in VS 2008 with Qt integration. Here is my system configuration:</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas></FONT></FONT>&nbsp; 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1) New Project --&gt; Qt Projects --&gt; Qt Application</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>2) Project Name: AddressBook, then click Finish button</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>3) Build F7. Everything went OK and I saw a blank main window on the screen.</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>4) Drag and drop a QVTKWidget on QMainWindow</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>5) F5 or F7</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>6) I got the following 35 error message.</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas></FONT></FONT>&nbsp; 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>I tried including all kinds of QVTKWidget stuffs to my project but all failed. What is wrong?</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Consolas size=3></FONT>&nbsp; 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Consolas size=3>Thank you.</FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Consolas size=3>Jim</FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Consolas size=3></FONT>&nbsp; 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Consolas size=3>----------------------------&nbsp;</FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;------ Build started: Project: AddressBook, Configuration: Debug Win32 ------</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;Compiling...</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;addressbook.cpp</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;main.cpp</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;Generating Code...</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;Compiling...</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;moc_addressbook.cpp</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;Linking...</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;addressbook.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QVTKWidget::QVTKWidget(class QWidget *,class QFlags&lt;enum Qt::WindowType&gt;)" (__imp_??0QVTKWidget@@QAE@PAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z) referenced in function "public: void __thiscall Ui_AddressBookClass::setupUi(class QMainWindow *)" (?setupUi@Ui_AddressBookClass@@QAEXPAVQMainWindow@@@Z)</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;addressbook.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall QVTKWidget::metaObject(void)const " (?metaObject@QVTKWidget@@UBEPBUQMetaObject@@XZ)</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;addressbook.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall QVTKWidget::qt_metacast(char const *)" (?qt_metacast@QVTKWidget@@UAEPAXPBD@Z)</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;addressbook.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall QVTKWidget::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QVTKWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z)</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;addressbook.obj : error LNK2001: unresolved external symbol "protected: virtual bool __thiscall QVTKWidget::event(class QEvent *)" (?event@QVTKWidget@@MAE_NPAVQEvent@@@Z)</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;addressbook.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QVTKWidget::mousePressEvent(class QMouseEvent *)" (?mousePressEvent@QVTKWidget@@MAEXPAVQMouseEvent@@@Z)</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>.......</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Consolas size=3>.......</FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;addressbook.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QVTKWidget::~QVTKWidget(void)" (__imp_??1QVTKWidget@@UAE@XZ) referenced in function "public: virtual void * __thiscall QVTKWidget::`scalar deleting destructor'(unsigned int)" (??_GQVTKWidget@@UAEPAXI@Z)</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;C:\Documents and Settings\tiger\My Documents\Visual Studio 2008\Projects\AddressBook\Debug\AddressBook.exe : fatal error LNK1120: 34 unresolved externals</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;Build log was saved at "file://c:\Documents and Settings\tiger\My Documents\Visual Studio 2008\Projects\AddressBook\AddressBook\Debug\BuildLog.htm"</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face=Consolas>1&gt;AddressBook - 35 error(s), 0 warning(s)</FONT></FONT> 
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Consolas size=3>&nbsp;</FONT></DIV></TD></TR></TBODY></TABLE><BR></DIV><PRE>_______________________________________________
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
</PRE></BLOCKQUOTE></td></tr></table><br>