<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">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:<br>
<br>
<span style=" color:#008000;">LIBS</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">+=</span><span style=" color:#c0c0c0;">
</span><span style=" color:#008000;">-LC:/VTK-VS10/lib/vtk-5.10</span><span style=" color:#c0c0c0;">
</span><span style=" color:#008000;">-lQVTK</span><span style=" color:#c0c0c0;"> </span>
<span style=" color:#008000;">-lvtkRendering</span><span style=" color:#c0c0c0;">
</span><span style=" color:#008000;">-lvtkGraphics</span><span style=" color:#c0c0c0;">
</span><span style=" color:#008000;">-lvtkImaging</span><span style=" color:#c0c0c0;">
</span><span style=" color:#008000;">-lvtkIO</span><span style=" color:#c0c0c0;">
</span><span style=" color:#008000;">-lvtkFiltering</span><span style=" color:#c0c0c0;">
</span><span style=" color:#008000;">-lvtkCommon</span><span style=" color:#c0c0c0;">
</span><span style=" color:#008000;">\</span>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">-lvtkpng</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lvtktiff</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lvtkjpeg</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lvtkexpat</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lvfw32</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lopengl32</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">\</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">-lwsock32</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lvtksys</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lws2_32</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lvtkexoIIc</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lvtkNetCDF</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">\</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">-lvtklibxml2</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lvtkzlib</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lvtkalglib</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">\</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">-lgdi32</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lkernel32</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-luser32</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lgdi32</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lwinspool</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lshell32</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lole32</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-loleaut32</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-luuid</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-lcomdlg32</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">-ladvapi32</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></pre>
After making a couple of code changes and changing the LIBS line to this:<br>
<br>
<span style=" color:#800080;">LIBS</span><span style=" color:#c0c0c0;"> </span>+=<span style=" color:#c0c0c0;">
</span>-LC:/VTK-6.3.0-VS10/lib<span style=" color:#c0c0c0;"> </span>-lvtkGUISupportQT-6.3<span style=" color:#c0c0c0;">
</span>-lvtkRenderingCore-6.3<span style=" color:#c0c0c0;"> </span>-lvtkImagingCore-6.3<span style=" color:#c0c0c0;">
</span>-lvtkIOCore-6.3<span style=" color:#c0c0c0;"> </span>-lvtkFiltersCore-6.3<span style=" color:#c0c0c0;">
</span>-lvtkCommonCore-6.3<span style=" color:#c0c0c0;"> </span>\
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">-lvtkpng-6.3<span style=" color:#c0c0c0;"> </span>-lvtktiff-6.3<span style=" color:#c0c0c0;"> </span>-lvtkjpeg-6.3<span style=" color:#c0c0c0;"> </span>-lvtkexpat-6.3<span style=" color:#c0c0c0;"> </span>-lvtksys-6.3<span style=" color:#c0c0c0;"> </span>-lvtkexoIIc-6.3<span style=" color:#c0c0c0;"> </span>-lvtkNetCDF-6.3<span style=" color:#c0c0c0;"> </span>-lvtklibxml2-6.3<span style=" color:#c0c0c0;"> </span>-lvtkzlib-6.3<span style=" color:#c0c0c0;"> </span>-lvtkalglib-6.3<span style=" color:#c0c0c0;"> </span>\</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">-lvtkRenderingQT-6.3<span style=" color:#c0c0c0;"> </span>\</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">-lws2_32<span style=" color:#c0c0c0;"> </span>-lwsock32<span style=" color:#c0c0c0;"> </span>-lvfw32<span style=" color:#c0c0c0;"> </span>-lopengl32<span style=" color:#c0c0c0;"> </span>-lgdi32<span style=" color:#c0c0c0;"> </span>-lkernel32<span style=" color:#c0c0c0;"> </span>-luser32<span style=" color:#c0c0c0;"> </span>-lgdi32<span style=" color:#c0c0c0;"> </span>-lwinspool<span style=" color:#c0c0c0;"> </span>-lshell32<span style=" color:#c0c0c0;"> </span>-lole32<span style=" color:#c0c0c0;"> </span>-loleaut32<span style=" color:#c0c0c0;"> </span>-luuid<span style=" color:#c0c0c0;"> </span>-lcomdlg32<span style=" color:#c0c0c0;"> </span>-ladvapi32</pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></pre>
I am almost successful - no compile errors and only 189 unresolved externals ;)<br>
<br>
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?<br>
<br>
Thanks<br>
Gib<br>
</div>
</body>
</html>