tags:

views:

409

answers:

1
+1  Q: 

Qt + VTK + Cmake

I'm running OSX 10.6 (Snow Leopard), Qt 4.6, VTK 5.4, and Cmake 2.8. I installed Qt, then VTK and Cmake. I configured VTK to use QT 4.6 (turned on VTK_USE_GUISUPPORT and VTK_USE_QVTK). The configuration and installation worked painlessly but if I run Cmake with Qt references the compilation fails during the subsequent make process because of failed dependency resolution.

As an example, I tried to build the Qt ImageViewer example (VTK/Examples/GUI/Qt/ImageViewer) and it failed to find qapplication.h (and all other qt headers). Any ideas about why this might be happening would be greatly appreciated!

+2  A: 

CMake finds Qt by looking for qmake (ironic, eh?). Make sure qmake is in your path.

Also, make sure VTK and Qt 4.6 were compiled with the same version of gcc/g++. Weird runtime errors (like cout not working) can result.

Simeon Fitch