[vtkusers] VTK 6.3 in Qt Creator

Gib Bogle g.bogle at auckland.ac.nz
Sun Nov 15 20:06:59 EST 2015


I have been using VTK 5.10 with Qt on Windows for some time, and now, somewhat against my better judgment, I've decided to try using VTK 6.3.  Since I build my program with Qt Creator, from a .pro file, the way I do it (the only way I know) is by adding a list of library files, like this:

LIBS += -LC:/VTK-VS10/lib/vtk-5.10 -lQVTK -lvtkRendering -lvtkGraphics -lvtkImaging -lvtkIO -lvtkFiltering -lvtkCommon \

-lvtkpng -lvtktiff -lvtkjpeg -lvtkexpat -lvfw32 -lopengl32  \

-lwsock32 -lvtksys -lws2_32 -lvtkexoIIc -lvtkNetCDF \

-lvtklibxml2 -lvtkzlib -lvtkalglib \

-lgdi32 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32


After making a couple of code changes and changing the LIBS line to this:

LIBS += -LC:/VTK-6.3.0-VS10/lib -lvtkGUISupportQT-6.3 -lvtkRenderingCore-6.3 -lvtkImagingCore-6.3 -lvtkIOCore-6.3 -lvtkFiltersCore-6.3 -lvtkCommonCore-6.3 \

-lvtkpng-6.3 -lvtktiff-6.3 -lvtkjpeg-6.3 -lvtkexpat-6.3 -lvtksys-6.3 -lvtkexoIIc-6.3 -lvtkNetCDF-6.3 -lvtklibxml2-6.3 -lvtkzlib-6.3 -lvtkalglib-6.3 \

-lvtkRenderingQT-6.3 \

-lws2_32 -lwsock32 -lvfw32 -lopengl32 -lgdi32 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32


I am almost successful - no compile errors and only 189 unresolved externals ;)

There must be a better way.  What is the recommended procedure for using Qt Creator to build a Qt program that uses VTK?  If what I am doing is the only way, what am I missing?

Thanks
Gib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151116/69cbf2f6/attachment.html>


More information about the vtkusers mailing list