bigz90
bigz90

Reputation: 89

Install VTK 6.2.0 with Qt 5.4 using CMake-GUI 3.2.2

This is the first time I try to use Vtk libraries but I can not find a tutorial that can help me with the qt integration. I tried several tutorials but when I try to write some code, qt can not find vtk libraries. I followed this post but something doesn't work correctly: Combining Qt 5.4.1 with vtk 6.2.0 (using CMake GUI 3.2.1) on windows Can someone explain me the correct procedure? I'm using Windows 7 64 bit, VTK 6.2.0, QT 5.4 and CMake-GUI 3.2.2. Thanks to all who respond!

Upvotes: 0

Views: 2839

Answers (2)

asdfasdf
asdfasdf

Reputation: 804

Did you build the vtk solution in debug or release? In the example you linked (it was me), I did it in debug, so it will only work in debug (until I build it in release)

also, maybe it's your cMakeList the problem. Did you manage to launch the project EasyView from the vtk solution?

Finally, the tutorial I followed was this one : http://www.vtk.org/Wiki/VTK/Tutorials/QtSetup

The only thing I had to modify, was to change the qt version to 5, add another entry cmake_prefix and set up several environment variables.

Upvotes: 1

nayana
nayana

Reputation: 3932

Try to create Qt project with cmake instead of qmake like is described here

For a first step try to write just hello world in Qt and try to create cmake for it..

Then you just add the VTK find functions and use those to add vtk support to your qt cmake project. Maybe its something like this (never used vtk):

FIND_PACKAGE(VTK REQUIRED)
INCLUDE(${VTK_USE_FILE})

Then you should be able to use Qt and vtk in same project..

Upvotes: 0

Related Questions