[vtkusers] Cmake + VTK + QT issues

Arnaud GELAS arnaud_gelas at hms.harvard.edu
Wed Jan 20 17:49:00 EST 2010


In the CMakeCache.txt you provided VTK_DIR:PATH=/usr/local/VTK, I am 
just surprised that your libraries and headers are at 
/usr/local/lib/vtk-5.4 and /usr/local/include/vtk-5.4...

If I am not wrong your VTK_DIR should be set to /usr/local/lib/vtk-5.4 
instead


On 01/20/2010 05:38 PM, Caleb Johnston wrote:
> I have been able to successfully build VTK with QT.
> I do have QVTKWidget.h (located in /usr/local/include/vtk-5.4).
> I *don't* have moc_QVTKWidget.cxx but I do have QVTKWidget.cxx.
> Also I have /usr/local/lib/vtk-5.4/libQVTK.a  --but thats it. I did 
> not move anything around, but does this configuration seem bad to you?
>
> Caleb
>
>
> On Wed, Jan 20, 2010 at 5:22 PM, Arnaud GELAS 
> <arnaud_gelas at hms.harvard.edu <mailto:arnaud_gelas at hms.harvard.edu>> 
> wrote:
>
>     Have you successfully built vtk with qt?
>     Can you check if there is one file QVTKWidget.h (where vtk is
>     installed /usr/local/VTK) ?
>     Can you check wherever you compiled vtk in the directory if
>     GUISupport/Qt if there is one file moc_QVTKWidget.cxx and in bin
>     if you have libQVTK* ?
>
>
>     On 01/20/2010 05:05 PM, Caleb Johnston wrote:
>>     I have tried directing cmake to qmake (in /usr/bin/qmake-4.6)
>>     during configuration but I still cannot build something using
>>     QVTK. I have attached my CMakeCache.txt for:
>>     VTK/Examples/GUI/Qt/ImageViewer
>>
>>     thanks,
>>     Caleb
>>
>>
>>     On Wed, Jan 20, 2010 at 4:58 PM, Arnaud GELAS
>>     <arnaud_gelas at hms.harvard.edu
>>     <mailto:arnaud_gelas at hms.harvard.edu>> wrote:
>>
>>         qt 4.6 was working fine for me (alone), but when building vtk
>>         (to build QVTK widget, QtCharts, etc.) I had some errors...
>>
>>         Has CMake found qmake?
>>         It is normally located at /usr/bin/qmake-4.6. Once cmake has
>>         found qmake, most of qt variables are generally set (on mac
>>         at least, not sometimes on linux PHONON variables are not
>>         found, you have to manually edit them).
>>
>>         Can you send the file CMakeCache.txt, pls?
>>
>>         Thanks,
>>         Arnaud
>>
>>
>>         On 01/20/2010 04:53 PM, Caleb Johnston wrote:
>>>         I have not built it from source. Instead I used the Qt open
>>>         source installer for 4.6 on my Mac and it worked fine. I'm
>>>         just having issues building VTK with the QVTK widget.
>>>
>>>         Caleb
>>>
>>>
>>>         On Wed, Jan 20, 2010 at 4:39 PM, Arnaud GELAS
>>>         <arnaud_gelas at hms.harvard.edu
>>>         <mailto:arnaud_gelas at hms.harvard.edu>> wrote:
>>>
>>>             Has anyone successfully built vtk with recent Qt version
>>>             (>=4.6.0, with delivered installers) on mac (carbon or
>>>             cocoa)?
>>>
>>>             I have tried using Qt 4.6.0, 4.6.1 (mac, cocoa) and
>>>             always had the same error because QtDBus.Framework is
>>>             missing...
>>>             It is an open bug in Qt see
>>>             http://bugreports.qt.nokia.com/browse/QTBUG-6429
>>>
>>>             Some time back I asked if QtDBus was really needed to
>>>             build vtk with qt on the list:
>>>             http://old.nabble.com/vtk-QtDBus--td26599452.html
>>>             But I did not get any answer... Is it really required to
>>>             build vtk?
>>>
>>>             Thanks,
>>>             Arnaud
>>>
>>>
>>>             On 01/20/2010 04:18 PM, John Drescher wrote:
>>>
>>>                 On Wed, Jan 20, 2010 at 4:13 PM, David
>>>                 Doria<daviddoria+vtk at gmail.com
>>>                 <mailto:daviddoria%2Bvtk at gmail.com>>  wrote:
>>>
>>>                     On Wed, Jan 20, 2010 at 4:05 PM, Caleb
>>>                     Johnston<cjj37 at cornell.edu
>>>                     <mailto:cjj37 at cornell.edu>>  wrote:
>>>
>>>                         I am developing an application using QT 4.6
>>>                         and VTK 5.4 with CMake 2.8.
>>>                         However, I am having troubles compiling with
>>>                         QVTK. Here is an overview of my
>>>                         situation.
>>>
>>>                         I am trying to compile the VTK Qt
>>>                         ImageViewer example as a test for using
>>>                         the QVTK widget. This example is in the
>>>                         source tree at
>>>                         Examples/GUI/Qt/ImageViewer. I have been
>>>                         able to get this to work on Ubuntu
>>>                         9.10. I followed instructions that I read
>>>                         from this mailing list and other
>>>                         related sites. But on OSX 10.6, I cannot get
>>>                         VTK to compile using Carbon or
>>>                         Cocoa. It always fails during the make
>>>                         process with the following error:
>>>
>>>                         .../VTK/Examples/GUI/Qt/ImageViewer/main.cxx:36:24:
>>>                         error: QVTKWidget.h:
>>>                         No such file or directory
>>>                         .../VTK/Examples/GUI/Qt/ImageViewer/main.cxx: In
>>>                         function ‘int main(int,
>>>                         char**)’:
>>>                         .../VTK/Examples/GUI/Qt/ImageViewer/main.cxx:42:
>>>                         error: ‘QVTKWidget’ was
>>>                         not declared in this scope
>>>                         .../VTK/Examples/GUI/Qt/ImageViewer/main.cxx:42:
>>>                         error: expected `;'
>>>                         before ‘widget’
>>>                         .../VTK/Examples/GUI/Qt/ImageViewer/main.cxx:43:
>>>                         error: ‘widget’ was not
>>>                         declared in this scope
>>>
>>>                         However QVTKWidget.h is located
>>>                         /usr/local/include/vtk-5.4/QVTKWidget.h.
>>>                         What has gone wrong here?
>>>
>>>                         Also, on Windows XP SP3, no matter what I
>>>                         try, Cmake reports "Qt was not
>>>                         found." However, it is installed. And I have
>>>                         manually created the QTDIR
>>>                         environment variable which points to
>>>                         'C:/Qt/2010.01/'. I have also indicated
>>>                         that I am using version 4 (with
>>>                         DESIRED_QT_VERSION). And I can successfully
>>>                         develop a QT stand-alone app with this
>>>                         environment.
>>>
>>>                         Any help or guidance would be greatly
>>>                         appreciated!
>>>
>>>                         Caleb
>>>
>>>
>>>                     It's been a while since I tried this, but I
>>>                     believe I had to turn on
>>>                     VTK_USE_QT and VTK_USE_GUISUPPORT in the
>>>                     advanced VTK build configuration.
>>>                     Thanks,
>>>
>>>
>>>                 That is needed I did that last week.. Also if Qt is
>>>                 not found setting
>>>                 the location of the qmake executable in cmake-gui or
>>>                 ccmake will fix
>>>                 that. This is what I do when CMake can not find Qt
>>>                 on windows. I do
>>>                 this all the time since there is no standard
>>>                 location in windows and I
>>>                 have my source code at X: no source code at all on
>>>                 the OS partition.
>>>
>>>                 John
>>>                 _______________________________________________
>>>                 Powered by www.kitware.com <http://www.kitware.com>
>>>
>>>                 Visit other Kitware open-source projects at
>>>                 http://www.kitware.com/opensource/opensource.html
>>>
>>>                 Please keep messages on-topic and check the VTK FAQ
>>>                 at: http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>>                 Follow this link to subscribe/unsubscribe:
>>>                 http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>>             _______________________________________________
>>>             Powered by www.kitware.com <http://www.kitware.com>
>>>
>>>             Visit other Kitware open-source projects at
>>>             http://www.kitware.com/opensource/opensource.html
>>>
>>>             Please keep messages on-topic and check the VTK FAQ at:
>>>             http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>>             Follow this link to subscribe/unsubscribe:
>>>             http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>
>>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100120/d09bd2bc/attachment.htm>


More information about the vtkusers mailing list