<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:14pt"><font size="3">Hi Luis,<br><br>Thanks, I've successfully compiled qt with cmake.<br>but when I use vtk , errors that occured like this :<br></font><div><font size="3"> </font></div><font size="2">make[2]: *** No rule to make target `/usr/lib/libtiff.so', needed by `qtvtk'. Stop.<br>make[2]: Leaving directory `/home/sutrisno/project-sut/qtvtkcmake'<br>make[1]: *** [CMakeFiles/qtvtk.dir/all] Error 2<br>make[1]: Leaving directory `/home/sutrisno/project-sut/qtvtkcmake'<br>make: *** [all] Error 2<br>root@sutrisno-pc:~/project-sut/qtvtkcmake</font><div style="font-family: arial,helvetica,sans-serif; font-size: 14pt;"><br><br><font size="3">Regards,<br><br> Sutrisno</font><br> <br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font size="2"
face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">Dari:</span></b> Luis Ibanez <luis.ibanez@kitware.com><br><b><span style="font-weight: bold;">Kepada:</span></b> SUTRISNO SUTRISNO <sutrisno_link@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> itk <Insight-users@itk.org><br><b><span style="font-weight: bold;">Terkirim:</span></b> Ming, 28 Maret, 2010 01:23:10<br><b><span style="font-weight: bold;">Judul:</span></b> How to use ITK+VTK+QT in an application<br></font><br>Hi Sutirsno,<br><br>Here is what you need in your CMakeLists.txt file<br>in order to use ITK+VTK+Qt:<br><br><br>FIND_PACKAGE(ITK REQUIRED)<br>INCLUDE(${ITK_USE_FILE})<br><br>FIND_PACKAGE(VTK REQUIRED)<br>INCLUDE(${VTK_USE_FILE})<br><br>FIND_PACKAGE( Qt4 REQUIRED )<br><br><br>INCLUDE_DIRECTORIES(<br> ${QT_INCLUDES}<br> ${VTK_INCLUDE_DIR}<br> ${QT_INCLUDE_DIR}<br> ${QT_QTGUI_INCLUDE_DIR}<br>
${QT_QTCORE_INCLUDE_DIR}<br> ${CMAKE_CURRENT_BINARY_DIR}<br> ${CMAKE_CURRENT_SOURCE_DIR}<br> )<br><br>LINK_LIBRARIES (<br> ITKIO ITKStatistics ITKNumerics<br> ${QT_QTCORE_LIBRARY}<br> ${QT_QTGUI_LIBRARY}<br> vtkCommon<br> vtkRendering<br> vtkIO<br> vtkFiltering<br> vtkGraphics<br> vtkWidgets<br> vtkImaging<br> )<br><br><br><br>Regards,<br><br><br> Luis<br><br><br><br><br>---------------------------------------------------------------------<br>On Thu, Mar 25, 2010 at 9:35 PM, SUTRISNO SUTRISNO<br><<a ymailto="mailto:sutrisno_link@yahoo.com" href="mailto:sutrisno_link@yahoo.com">sutrisno_link@yahoo.com</a>> wrote:<br>> Hi Luis,<br>><br>> I've studied hard to configure my project with cmake<br>> but I am still confused in writing CMakelists.txt<br>> Can you help me how to write CMakeList.txt?<br>><br>> I tried it in
stages<br>> 1. Just qt<br>> 2. qt + vtk<br>> 3. vtk and qt + ITK<br>><br>> I failed for the first step (qt only). I made a simple program and I tried<br>> configured with cmake<br>> my project directory:<br>> qtcmake /<br>> - project.pro<br>> - main.cpp<br>> - form1.ui<br>> - form1.ui.h<br>><br>> my CMakeLists.txt :<br>><br>> cmake_minimum_required(VERSION 2.6)<br>> PROJECT(QtCmake)<br>> INCLUDE
(${CMAKE_ROOT}/Modules/FindQt.cmake)<br>> FIND_PACKAGE(Qt3 REQUIRED)<br>> INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR})<br>> LINK_LIBRARIES( ${QT_QT_LIBRARY})<br>> ADD_EXECUTABLE(QtCmake form1.ui.h form1.ui main.cpp )<br>><br>> But there were error :<br>><br>> root@sutrisno-pc:~/project-sut/qtcmake# cmake .<br>> -- Configuring done<br>> -- Generating done<br>> -- Build files have been written to: /home/sutrisno/project-sut/qtcmake<br>> root@sutrisno-pc:~/project-sut/qtcmake# make<br>> Scanning dependencies of target QtCmake<br>> [100%] Building CXX object CMakeFiles/QtCmake.dir/main.cpp.o<br>> /home/sutrisno/project-sut/qtcmake/main.cpp:2:19: error: form1.h: No such<br>> file or directory<br>> /home/sutrisno/project-sut/qtcmake/main.cpp: In function ‘int main(int,<br>> char**)’:<br>> /home/sutrisno/project-sut/qtcmake/main.cpp:7: error:
‘Form1’ was not<br>> declared in this scope<br>> /home/sutrisno/project-sut/qtcmake/main.cpp:7: error: expected `;' before<br>> ‘w’<br>> /home/sutrisno/project-sut/qtcmake/main.cpp:8: error: ‘w’ was not declared<br>> in this scope<br>> make[2]: *** [CMakeFiles/QtCmake.dir/main.cpp.o] Error 1<br>> make[1]: *** [CMakeFiles/QtCmake.dir/all] Error 2<br>> make: *** [all] Error 2<br>> root@sutrisno-pc:~/project-sut/qtcmake#<br>><br>><br>> Regards,<br>><br>> Sutrisno<br>> ________________________________<br></div></div>
</div><br>
<hr size=1> <a href="http://sg.rd.yahoo.com/id/mail/domainchoice/mail/signature/*http://mail.promotions.yahoo.com/newdomains/id/"> Dapatkan alamat Email baru Anda! </a> <br>
Dapatkan nama yang selalu Anda inginkan sebelum diambil orang lain!</body></html>