Hi Sutrisno,<br><br>I wonder if you set the following variablees when compiling VTK.<br><br>VTK_USE_QT set to ON<br>VTK_USE_GUISUPPORT set to ON<br><br>Kishore<br><br><div class="gmail_quote">On Sun, Mar 28, 2010 at 2:10 AM, SUTRISNO SUTRISNO <span dir="ltr"><<a href="mailto:sutrisno_link@yahoo.com">sutrisno_link@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><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 face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">Dari:</span></b> Luis Ibanez <<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>><br><b><span style="font-weight: bold;">Kepada:</span></b> SUTRISNO SUTRISNO <<a href="mailto:sutrisno_link@yahoo.com" target="_blank">sutrisno_link@yahoo.com</a>><br>
<b><span style="font-weight: bold;">Cc:</span></b> itk <<a href="mailto:Insight-users@itk.org" target="_blank">Insight-users@itk.org</a>><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 href="mailto:sutrisno_link@yahoo.com" target="_blank">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>> - <a href="http://project.pro" target="_blank">project.pro</a><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/" target="_blank"> Dapatkan alamat Email baru Anda! </a> <br>
Dapatkan nama yang selalu Anda inginkan sebelum diambil orang lain!</div><br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" 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" 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.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br>