<div class="gmail_quote">On Thu, Sep 27, 2012 at 9:46 AM, fabiola <span dir="ltr"><<a href="mailto:fabiola.fischer.F@gmail.com" target="_blank">fabiola.fischer.F@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I am sorry barging in with a silly question, but I am really stuck in the<br>
beginning: to compile an ITK example (DicomSeriesReadImageWrite2) in QT.<br>
I am using: Ubuntu 12.04, QT Creator 2.5.2 and ITK 4.2.<br>
<br>
I added ITK libraries to .pro like I did before for VTK (and it worked):<br>
INCLUDEPATH += /usr/local/include/vtk-5.10 \<br>
/usr/local/include/ITK-4.2<br>
<br>
LIBS += -lvtkDICOMParser \<br>
-lvtkRendering \<br>
-lvtkCommon \<br>
-lvtkIO \<br>
-lvtkFiltering \<br>
-lQVTK \<br>
<br>
LIBS += -L/usr/local/lib/ \<br>
-lITKCommon-4.1 \<br>
-lITKDICOMParser-4.1<br>
<br>
QMAKE_CXXFLAGS += -Wno-deprecated<br>
<br>
but unfortunately the compiler telling me that: "cannot find<br>
-lITKCommon-4.1" (I checked, the libraries are in my /usr/local/lib...)<br>
<br>
Please help me out. I can't find any solution on the net, just seeing that<br>
the others had the same problem, but no solution...<br>
<br>
Thank you in advance,<br>
Fabiola.<br></blockquote><div><br></div>You should not be doing any of this manually - CMake does it all for you. You should use a CMakeLists.txt file similar to this one:<div><br></div><div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/RenderWindowUIMultipleInheritance">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/RenderWindowUIMultipleInheritance</a></div>
<div><br></div><div>but of course also include the standard ITK things (like in any example on the wiki, like this one: <a href="http://www.itk.org/Wiki/ITK/Examples/SimpleOperations/RequestedRegion">http://www.itk.org/Wiki/ITK/Examples/SimpleOperations/RequestedRegion</a> ) including find_package/include for ITK and add ${ITK_LIBRARIES} to target_link_libraries.<br clear="all">
<br></div><div>David </div></div>