Thanks Luis. I got it to work, btw. My cmakelists.txt file looks like this:<br>----<br>PROJECT(myimg)<br><br># Find ITK.<br>FIND_PACKAGE(ITK REQUIRED)<br>IF(ITK_FOUND)<br> INCLUDE(${ITK_USE_FILE})<br>ENDIF(ITK_FOUND)<br><br>
FIND_PACKAGE(QT)<br>IF(QT_FOUND)<br> INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})<br>ENDIF(QT_FOUND)<br><br>INCLUDE(${QT_USE_FILE})<br><br>ADD_EXECUTABLE(myimg myclass.cpp myclass.h mymain.cpp)<br><br>TARGET_LINK_LIBRARIES(myimg ITKCommon ITKIO ${QT_LIBRARIES})
<br>---------<br>Please let me know if I need to add anything else here. Previously I didn't include the line<br>INCLUDE(${QT_USE_FILE})<br>and it was not working.<br><br>Thanks,<br>Ashish<br><br><div><span class="gmail_quote">
On 1/15/07, <b class="gmail_sendername">Luis Ibanez</b> <<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Hi Ashish,<br><br>Please post to the list the CMakeLists.txt file that you<br>used for integrating ITK and Qt in your applications.<br><br>You may find useful to look at the example in<br><br><br> InsightApplications/QtITK
<br><br><br>Regrads,<br><br><br> Luis<br><br><br>---------------------<br>Ashish Singh wrote:<br>> Hi,<br>><br>> I am trying to integrate my simple ITK application with Qt. I am using<br>> qmake, but having problems writing the ',pro' file. After I provide the
<br>> paths to include files and libraries and run qmake from the command<br>> prompt, I get the '.vcproj' file. When I try to build this project from<br>> inside the visual studio, it is not able to find the header file-
<br>> 'vnl/vnl_vector.h' and gives me the following error.<br>><br>> c:\myinstalls\itk\insighttoolkit-3.0.0\code\io\itkImageIOBase.h(24) :<br>> fatal error C1083: Cannot open include file: 'vnl/vnl_vector.h': No such
<br>> file or directory<br>><br>> I have included the path to 'vnl_vector.h' in my qmake '.pro' file. I am<br>> not able to figure out why is it not able to find the path. I tried Qt<br>> with ITk, using Cmake, but there my visual studio project cannot find
<br>> the file ' qapplication.h', although I have the right paths and<br>> libraries in place. Can anyone please tell me where am I going wrong?<br>> Or else guide me to use ITK with Qt, either using qmake or cmake.
<br>><br>> Thanks,<br>> Ashish<br>><br>><br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> Insight-users mailing list
<br>> <a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>> <a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote></div><br>