[vtkusers] Error runnig Qt with VTK on Windows

Amy Squillacote amy.squillacote at kitware.com
Wed Feb 21 15:00:14 EST 2007


Just as a sanity check: when you built VTK, did you turn on the 
VTK_USE_QVTK CMake option?

- Amy

Olowoyeye, Adebayo Ol Uwole wrote:
> Hi all,
>  I am trying to use the Qt library to interface with VTK in Visual 
> C++.  After adding all the .lib files in C:\QT\lib as additional 
> dependencies for the project, I get some errors I hope someone can 
> help me out with.  I am trying to run one of the qt example program 
> that comes with the VTK package.
> They are the following:
>
> 1>------ Build started: Project: QtTest, Configuration: Debug Win32 
> ------
> 1>Linking...
> 1>main.obj : error LNK2019: unresolved external symbol 
> "__declspec(dllimport) public: virtual __thiscall 
> QVTKWidget::~QVTKWidget(void)" (__imp_??1QVTKWidget@@UAE at XZ) 
> referenced in function _main
> 1>main.obj : error LNK2019: unresolved external symbol 
> "__declspec(dllimport) public: class vtkRenderWindow * __thiscall 
> QVTKWidget::GetRenderWindow(void)" 
> (__imp_?GetRenderWindow at QVTKWidget@@QAEPAVvtkRenderWindow@@XZ) 
> referenced in function _main
> 1>main.obj : error LNK2019: unresolved external symbol 
> "__declspec(dllimport) public: void __thiscall 
> QVTKWidget::SetRenderWindow(class vtkRenderWindow *)" 
> (__imp_?SetRenderWindow at QVTKWidget@@QAEXPAVvtkRenderWindow@@@Z) 
> referenced in function _main
> 1>main.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 _main
> 1>C:\Documents and Settings\Depauw\My Documents\Visual Studio 
> 2005\Projects\QtTest\Debug\QtTest.exe : fatal error LNK1120: 4 
> unresolved externals
> 1>Build log was saved at "file://c:\Documents and Settings\Depauw\My 
> Documents\Visual Studio 2005\Projects\QtTest\QtTest\Debug\BuildLog.htm"
> 1>QtTest - 5 error(s), 0 warning(s)
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped 
> ==========
>
>
> Thanks in advance for your time
>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages 
> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>

-- 
Amy Squillacote
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
Phone: (518) 371-3971 x106




More information about the vtkusers mailing list