[vtkusers] QVTKWidget error

David Doria daviddoria at gmail.com
Mon Apr 15 11:40:59 EDT 2013


On Mon, Apr 15, 2013 at 11:34 AM, Massinissa Bandou
<Massinissa.Bandou at usherbrooke.ca> wrote:
> Hello David,
> Thank you for your reply! yes I did. I built vtk5.10.1 using CMake2.8.7,
> enable VTK_USE_GUISUPPORT and vtk_USE_QT and copied the QVTKWidgetPlugin.dll
> to Qt designer plugin (from here, everything is fine).
> I'm not really familiar with Visual Studio, but I was able to fix my problem
> by adding QVTK.lib to the linker input (Additional Dependencies). I don't
> understand why I have to do this because I already add the path (C:\Program
> Files (x86)\VTK\lib\vtk-5.10) via the linker->general->Additional Library
> Directories.

Adding the path to Additional Library Directories just tells it "if
you need a library, look here". However, adding QVTK.lib tells it "I
need a library".

> I created a QT project (file->newproject->qtform) and add to the project's
> properties the VTK's & ITK's Additional Include Directories & Additional
> Library Directories (debug and release). By the way, I 'm not using
> CMakList.txt file for my project, after building vtk & generate the
> libraries, I don't know why the need of CMakelist.

If you use CMake, it sets up all of the library/header paths
automatically (preventing many problems like the one you've seen).

David



More information about the vtkusers mailing list