<div dir="ltr"><div><div><div><div><div><div><div>I tried so many things, and now I think it works...<br></div>without setting ITK_DIR in CMakeLists...<br></div>I added the ITK and VTK dlls to the PATH... I think I didn't reboot after that.<br><br></div>I compared the ImageFileReader CMakeLists.txt example, and restored some lines (about VTKITKGlue) I deleted.<br><br></div>If it helps to someone, my working CMakeLists.txt is now:<br><br><span style="color:#808000">CMAKE_MINIMUM_REQUIRED</span>(<span style="font-family:'Courier';font-size:10pt;color:#000000;background-color:#fdf6e3">VERSION</span><span style="color:#c0c0c0"> </span>2.8.11)
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">PROJECT</span><span style="color:#c0c0c0"> </span>(UtilityDICOM)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">FIND_PACKAGE</span>(Qt5Widgets<span style="color:#c0c0c0"> </span><span style="font-family:'Courier';font-size:10pt;color:#000000;background-color:#fdf6e3">REQUIRED</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">SET</span>(<span style="color:#c09050">CMAKE_INCLUDE_CURRENT_DIR</span><span style="color:#c0c0c0"> </span>ON)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">SET</span>(<span style="color:#c09050">CMAKE_AUTOMOC</span><span style="color:#c0c0c0"> </span>ON)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000000">QT5_WRAP_UI</span>(Cmake_form_hdr<span style="color:#c0c0c0"> </span>mainwindow.ui)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">add_library</span>(mainwindow<span style="color:#c0c0c0"> </span>mainwindow.cpp<span style="color:#c0c0c0"> </span><span style="color:#000080">${Cmake_form_hdr}</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000000">qt5_use_modules</span>(mainwindow<span style="color:#c0c0c0"> </span>Widgets)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#008000">#</span><span style="color:#c0c0c0"> </span><span style="color:#008000">ITK</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">FIND_PACKAGE</span>(ITK<span style="color:#c0c0c0"> </span><span style="font-family:'Courier';font-size:10pt;color:#000000;background-color:#fdf6e3">REQUIRED</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">INCLUDE</span>(<span style="color:#000080">${ITK_USE_FILE}</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">if</span><span style="color:#c0c0c0"> </span>(ITKVtkGlue_LOADED)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">find_package</span>(VTK<span style="color:#c0c0c0"> </span><span style="font-family:'Courier';font-size:10pt;color:#000000;background-color:#fdf6e3">REQUIRED</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">include</span>(<span style="color:#000080">${VTK_USE_FILE}</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">else</span>()</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">find_package</span>(ItkVtkGlue<span style="color:#c0c0c0"> </span><span style="font-family:'Courier';font-size:10pt;color:#000000;background-color:#fdf6e3">REQUIRED</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">include</span>(<span style="color:#000080">${ItkVtkGlue_USE_FILE}</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">set</span>(Glue<span style="color:#c0c0c0"> </span>ItkVtkGlue)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">endif</span>()</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">ADD_EXECUTABLE</span>(UtilityDICOM<span style="color:#c0c0c0"> </span><span style="font-family:'Courier';font-size:10pt;color:#000000;background-color:#fdf6e3">WIN32</span><span style="color:#c0c0c0"> </span>main.cpp)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">TARGET_LINK_LIBRARIES</span>(UtilityDICOM<span style="color:#c0c0c0"> </span>mainwindow<span style="color:#c0c0c0"> </span><span style="color:#000080">${Glue}</span><span style="color:#c0c0c0"> </span><span style="color:#000080">${VTK_LIBRARIES}</span><span style="color:#c0c0c0"> </span><span style="color:#000080">${ITK_LIBRARIES}</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000000">QT5_USE_MODULES</span>(UtilityDICOM<span style="color:#c0c0c0"> </span>Core<span style="color:#c0c0c0"> </span>Gui<span style="color:#c0c0c0"> </span>Widgets)<br><br></pre><br></div>Now I can access even to VTK libraries... Finally I can start to develop something.<br></div>I'm not sure what was happening, maybe the dlls in PATH and not rebooting after adding them.<br><br></div>Thanks for your time. I appreciate it.<br><div><div><br><br><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-14 20:08 GMT+02:00 Siavash Khallaghi <span dir="ltr"><<a href="mailto:siavashk@ece.ubc.ca" target="_blank">siavashk@ece.ubc.ca</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Marcos, if you add<br>
<<a href="http://typecastexception.com/post/2014/12/07/Adding-and-Editing-PATH-Environment-Variables-in-Windows.aspx" rel="noreferrer" target="_blank">http://typecastexception.com/post/2014/12/07/Adding-and-Editing-PATH-Environment-Variables-in-Windows.aspx</a>><br>
the location of your dlls to the PATH environment variable, QtCreator will<br>
automatically find them for you. Installing ITK /should/ take care of that<br>
for you though. Did you try rebooting your PC before running Qt?<br>
<br>
Siavash<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://itk-users.7.n7.nabble.com/ITK-users-Brand-new-project-with-itk-sentence-with-QtCreator-Qt5-and-Cmake-crashes-tp36005p36009.html" rel="noreferrer" target="_blank">http://itk-users.7.n7.nabble.com/ITK-users-Brand-new-project-with-itk-sentence-with-QtCreator-Qt5-and-Cmake-crashes-tp36005p36009.html</a><br>
Sent from the ITK - Users mailing list archive at Nabble.com.<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
</blockquote></div><br></div></div></div></div></div></div></div>