[vtkusers] Trouble building VTK with Qt Support - please help

Clinton Stimpson clinton at elemtech.com
Tue Apr 21 09:51:22 EDT 2009


You should use cmake 2.6 if you need support building with static Qt.

Clint

Raashid Baig wrote:
> I tried compiling the stable version of VTK - vtk-5.4.0
> with Qt - 4.3.4, the cmake version is 2.4.7, on a linux Ubuntu 
> machine. In CMakeCache.txt file 
> QT_MKSPECS_DIR:PATH=/home/raashid/src/qt-4.3.4-static_install/mkspecs
>
> Still I am getting compilation issues with the following errors -
>
> [ 88%] Building CXX object 
> GUISupport/Qt/Testing/Cxx/CMakeFiles/QVTKCxxTests.dir/TestQtTreeModelAdapter.o
> Linking CXX executable ../../../../bin/QVTKCxxTests
> /home/raashid/src/qt-4.3.4-static_install/lib/libQtGui.a(qguieventdispatcher_glib.o): 
> In function `QGuiEventDispatcherGlib::~QGuiEventDispatcherGlib()':
> qguieventdispatcher_glib.cpp:(.text+0x39): undefined reference to 
> `g_source_remove_poll'
> qguieventdispatcher_glib.cpp:(.text+0x44): undefined reference to 
> `g_source_destroy'
> /home/raashid/src/qt-4.3.4-static_install/lib/libQtGui.a(qguieventdispatcher_glib.o): 
> In function `QGuiEventDispatcherGlib::~QGuiEventDispatcherGlib()':
> qguieventdispatcher_glib.cpp:(.text+0x119): undefined reference to 
> `g_source_remove_poll'
> qguieventdispatcher_glib.cpp:(.text+0x124): undefined reference to 
> `g_source_destroy'
> /home/raashid/src/qt-4.3.4-static_install/lib/libQtGui.a(qguieventdispatcher_glib.o): 
> In function `QGuiEventDispatcherGlib::startingUp()':
> qguieventdispatcher_glib.cpp:(.text+0x1b6): undefined reference to 
> `g_source_add_poll'
> /home/raashid/src/qt-4.3.4-static_install/lib/libQtGui.a(qguieventdispatcher_glib.o): 
> In function `QGuiEventDispatcherGlib::~QGuiEventDispatcherGlib()':
> qguieventdispatcher_glib.cpp:(.text+0x209): undefined reference to 
> `g_source_remove_poll'
> qguieventdispatcher_glib.cpp:(.text+0x214): undefined reference to 
> `g_source_destroy'
> /home/raashid/src/qt-4.3.4-static_install/lib/libQtGui.a(qguieventdispatcher_glib.o): 
> In function 
> `QGuiEventDispatcherGlibPrivate::QGuiEventDispatcherGlibPrivate()':
> qguieventdispatcher_glib.cpp:(.text+0x606): undefined reference to 
> `g_source_new'
> qguieventdispatcher_glib.cpp:(.text+0x619): undefined reference to 
> `g_source_set_can_recurse'
> qguieventdispatcher_glib.cpp:(.text+0x653): undefined reference to 
> `g_source_attach'
> /home/raashid/src/qt-4.3.4-static_install/lib/libQtGui.a(qguieventdispatcher_glib.o): 
> In function 
> `QGuiEventDispatcherGlibPrivate::QGuiEventDispatcherGlibPrivate()':
> qguieventdispatcher_glib.cpp:(.text+0x7c6): undefined reference to 
> `g_source_new'
> qguieventdispatcher_glib.cpp:(.text+0x7d9): undefined reference to 
> `g_source_set_can_recurse'
> qguieventdispatcher_glib.cpp:(.text+0x813): undefined reference to 
> `g_source_attach'
> /home/raashid/src/qt-4.3.4-static_install/lib/libQtCore.a(qeventdispatcher_glib.o): 
> In function `QEventDispatcherGlib::hasPendingEvents()':
> qeventdispatcher_glib.cpp:(.text+0x5cf): undefined reference to 
> `g_main_context_pending'
> /home/raashid/src/qt-4.3.4-static_install/lib/libQtCore.a(qeventdispatcher_glib.o): 
> In function `QEventDispatcherGlib::processEvents(QFlags)':
> qeventdispatcher_glib.cpp:(.text+0x72e): undefined reference to 
> `g_main_context_iteration'
> qeventdispatcher_glib.cpp:(.text+0x74b): undefined reference to 
> `g_main_context_iteration'
> /home/raashid/src/qt-4.3.4-static_install/lib/libQtCore.a(qeventdispatcher_glib.o): 
> In function 
> `QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(_GMainContext*)':
> qeventdispatcher_glib.cpp:(.text+0x7fe): undefined reference to 
> `g_threads_got_initialized'
> qeventdispatcher_glib.cpp:(.text+0x81b): undefined reference to 
> `g_main_context_ref'
> qeventdispatcher_glib.cpp:(.text+0x831): undefined reference to 
> `g_source_new'
> qeventdispatcher_glib.cpp:(.text+0x844): undefined reference to 
> `g_source_set_can_recurse'
> qeventdispatcher_glib.cpp:(.text+0x920): undefined reference to 
> `g_source_add_poll'
> qeventdispatcher_glib.cpp:(.text+0x932): undefined reference to 
> `g_source_attach'
> qeventdispatcher_glib.cpp:(.text+0x948): undefined reference to 
> `g_source_new'
> qeventdispatcher_glib.cpp:(.text+0x971): undefined reference to 
> `g_source_set_can_recurse'
> qeventdispatcher_glib.cpp:(.text+0x983): undefined reference to 
> `g_source_attach'
> qeventdispatcher_glib.cpp:(.text+0x999): undefined reference to 
> `g_source_new'
> qeventdispatcher_glib.cpp:(.text+0x9bc): undefined reference to 
> `g_source_set_can_recurse'
> qeventdispatcher_glib.cpp:(.text+0x9ce): undefined reference to 
> `g_source_attach'
> qeventdispatcher_glib.cpp:(.text+0xa02): undefined reference to 
> `g_main_context_new'
> qeventdispatcher_glib.cpp:(.text+0xa28): undefined reference to 
> `g_thread_init'
> qeventdispatcher_glib.cpp:(.text+0xa36): undefined reference to 
> `g_main_context_default'
> /home/raashid/src/qt-4.3.4-static_install/lib/libQtCore.a(qeventdispatcher_glib.o): 
> In function 
> `QEventDispatcherGlib::unregisterSocketNotifier(QSocketNotifier*)':
> qeventdispatcher_glib.cpp:(.text+0xce7): undefined reference to 
> `g_source_remove_poll'
> /home/raashid/src/qt-4.3.4-static_install/lib/libQtCore.a(qeventdispatcher_glib.o): 
> In function 
> `QEventDispatcherGlib::registerSocketNotifier(QSocketNotifier*)':
> qeventdispatcher_glib.cpp:(.text+0xdc3): undefined reference to 
> `g_source_add_poll'
> /home/raashid/src/qt-4.3.4-static_install/lib/libQtCore.a(qeventdispatcher_glib.o): 
> In function `QEventDispatcherGlib::~QEventDispatcherGlib()':
> qeventdispatcher_glib.cpp:(.text+0xe5f): undefined reference to 
> `g_source_destroy'
> qeventdispatcher_glib.cpp:(.text+0xe6d): undefined reference to 
> `g_source_unref'
> qeventdispatcher_glib.cpp:(.text+0xebf): undefined reference to 
> `g_source_remove_poll'
> qeventdispatcher_glib.cpp:(.text+0xef6): undefined reference to 
> `g_source_destroy'
> qeventdispatcher_glib.cpp:(.text+0xf04): undefined reference to 
> `g_source_unref'
> qeventdispatcher_glib.cpp:(.text+0xf20): undefined reference to 
> `g_source_remove_poll'
> qeventdispatcher_glib.cpp:(.text+0xf5e): undefined reference to 
> `g_source_destroy'
> qeventdispatcher_glib.cpp:(.text+0xf6c): undefined reference to 
> `g_source_unref'
> qeventdispatcher_glib.cpp:(.text+0xf81): undefined reference to 
> `g_main_context_unref'
> /home/raashid/src/qt-4.3.4-static_install/lib/libQtCore.a(qeventdispatcher_glib.o): 
> In function `QEventDispatcherGlib::~QEventDispatcherGlib()':
> qeventdispatcher_glib.cpp:(.text+0x102f): undefined reference to 
> `g_source_destroy'
> qeventdispatcher_glib.cpp:(.text+0x103d): undefined reference to 
> `g_source_unref'
> qeventdispatcher_glib.cpp:(.text+0x108f): undefined reference to 
> `g_source_remove_poll'
> qeventdispatcher_glib.cpp:(.text+0x10c6): undefined reference to 
> `g_source_destroy'
> qeventdispatcher_glib.cpp:(.text+0x10d4): undefined reference to 
> `g_source_unref'
> qeventdispatcher_glib.cpp:(.text+0x10f0): undefined reference to 
> `g_source_remove_poll'
> qeventdispatcher_glib.cpp:(.text+0x112e): undefined reference to 
> `g_source_destroy'
> qeventdispatcher_glib.cpp:(.text+0x113c): undefined reference to 
> `g_source_unref'
> qeventdispatcher_glib.cpp:(.text+0x1151): undefined reference to 
> `g_main_context_unref'
> /home/raashid/src/qt-4.3.4-static_install/lib/libQtCore.a(qeventdispatcher_glib.o): 
> In function `QEventDispatcherGlib::~QEventDispatcherGlib()':
> qeventdispatcher_glib.cpp:(.text+0x120f): undefined reference to 
> `g_source_destroy'
> qeventdispatcher_glib.cpp:(.text+0x121d): undefined reference to 
> `g_source_unref'
> qeventdispatcher_glib.cpp:(.text+0x126f): undefined reference to 
> `g_source_remove_poll'
> qeventdispatcher_glib.cpp:(.text+0x12a6): undefined reference to 
> `g_source_destroy'
> qeventdispatcher_glib.cpp:(.text+0x12b4): undefined reference to 
> `g_source_unref'
> qeventdispatcher_glib.cpp:(.text+0x12d0): undefined reference to 
> `g_source_remove_poll'
> qeventdispatcher_glib.cpp:(.text+0x130e): undefined reference to 
> `g_source_destroy'
> qeventdispatcher_glib.cpp:(.text+0x131c): undefined reference to 
> `g_source_unref'
> qeventdispatcher_glib.cpp:(.text+0x1331): undefined reference to 
> `g_main_context_unref'
> /home/raashid/src/qt-4.3.4-static_install/lib/libQtCore.a(qeventdispatcher_glib.o): 
> In function 
> `QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(_GMainContext*)':
> qeventdispatcher_glib.cpp:(.text+0x13de): undefined reference to 
> `g_threads_got_initialized'
> qeventdispatcher_glib.cpp:(.text+0x13fb): undefined reference to 
> `g_main_context_ref'
> qeventdispatcher_glib.cpp:(.text+0x1411): undefined reference to 
> `g_source_new'
> qeventdispatcher_glib.cpp:(.text+0x1424): undefined reference to 
> `g_source_set_can_recurse'
> qeventdispatcher_glib.cpp:(.text+0x1500): undefined reference to 
> `g_source_add_poll'
> qeventdispatcher_glib.cpp:(.text+0x1512): undefined reference to 
> `g_source_attach'
> qeventdispatcher_glib.cpp:(.text+0x1528): undefined reference to 
> `g_source_new'
> qeventdispatcher_glib.cpp:(.text+0x1551): undefined reference to 
> `g_source_set_can_recurse'
> qeventdispatcher_glib.cpp:(.text+0x1563): undefined reference to 
> `g_source_attach'
> qeventdispatcher_glib.cpp:(.text+0x1579): undefined reference to 
> `g_source_new'
> qeventdispatcher_glib.cpp:(.text+0x159c): undefined reference to 
> `g_source_set_can_recurse'
> qeventdispatcher_glib.cpp:(.text+0x15ae): undefined reference to 
> `g_source_attach'
> qeventdispatcher_glib.cpp:(.text+0x15e2): undefined reference to 
> `g_main_context_new'
> qeventdispatcher_glib.cpp:(.text+0x1608): undefined reference to 
> `g_thread_init'
> qeventdispatcher_glib.cpp:(.text+0x1616): undefined reference to 
> `g_main_context_default'
> /home/raashid/src/qt-4.3.4-static_install/lib/libQtCore.a(qeventdispatcher_unix.o): 
> In function `QTimerInfoList::getTime(timeval&)':
> qeventdispatcher_unix.cpp:(.text+0x4ae): undefined reference to 
> `clock_gettime'
> collect2: ld returned 1 exit status
> make[2]: *** [bin/QVTKCxxTests] Error 1
> make[1]: *** 
> [GUISupport/Qt/Testing/Cxx/CMakeFiles/QVTKCxxTests.dir/all] Error 2
> make: *** [all] Error 2
>
> Please help me with the above issues.
> Thanks and regards,
> Raashid
>
>
> On Tue, 21 Apr 2009 02:54:11 +0530 wrote
> >As a side note, please remember that the ParaView doesn't officially
> >support Qt 4.5 yet. We currently support Qt 4.3.*. Qt 4.5 will be
> >officially supported after the ParaView 3.6 release.
> >
> >Utkarsh
> >
> >On Mon, Apr 20, 2009 at 10:09 AM, Clinton Stimpson wrote:
> >>
> >> What's the version of CMake?  Its supposed to take care of the glib
> >> dependency.
> >> And what is QT_MKSPECS_DIR set to in your CMakeCache.txt file?
> >>
> >> Clint
> <http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?> 
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Powered by 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
>   





More information about the vtkusers mailing list