[vtkusers] Cmake Error on VTK

Myk myk321 at gmail.com
Mon Nov 23 07:54:46 EST 2015


Hi Lays,

I has a similar problem to this where the cmake build of my application
failed trying to find QVTKWidget.h.  I solved it using a 2 step process:
Step 1: in the directory in which I built VTK, I ran the command:
sudo make install
The effect of this was the creation of a directory called
/usr/local/include/vtk-6.3, which contains QVTKwidget.h, along with lots of
other VTK headers.
Step 2: in my application itself (in my case in my .h file, but it could be
in your .cpp file), I modified the
#include <QVTKWidget2.h>
to read:
#include <vtk-6.3/QVTKwidget2.h>

I believe that the reason that this works, is that cmake searches
/usr/local/include, but not the folders underneath it, so by including 
vtk-6.3 in the #include effectively points out the local of the
QVTKWidget2.h header file.

Kind regards,
Michael




--
View this message in context: http://vtk.1045678.n5.nabble.com/Cmake-Error-on-VTK-tp5734739p5735156.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list