Results 1 to 6 of 6

Thread: QT 4.5.1 failed to build with gtk/gtk.h: No such file or directory

  1. #1
    Join Date
    Jun 2009
    Posts
    66
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default QT 4.5.1 failed to build with gtk/gtk.h: No such file or directory

    Hi,

    I posted this in the programming section, but realized it should going in this section instead. Not sure how to move a thread.

    I'm having an issue trying to build qt4.5.1 on ubuntu. I get the following error :-

    In file included from styles/qgtkpainter_p.h:59,
    from styles/qgtkstyle.cpp:72:
    styles/gtksymbols_p.h:60:21: error: gtk/gtk.h: No such file or directory
    make[1]: *** wait: No child processes. Stop.
    make[1]: *** Waiting for unfinished jobs....
    make[1]: *** wait: No child processes. Stop.
    make: *** wait: No child processes. Stop.
    make: *** Waiting for unfinished jobs....
    make: *** wait: No child processes. Stop.

    I've already installed libgtk1.2-dev, and libgtk2.0-dev, and the include file can be found in either

    linux:/usr/include$ find . -name gtk.h
    ./gtk-2.0/gtk/gtk.h
    ./gtk-1.2/gtk/gtk.h

    any ideas anyone?

    cheers,

    David

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT 4.5.1 failed to build with gtk/gtk.h: No such file or directory

    How about installing gtk+ development files too?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jun 2009
    Posts
    66
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT 4.5.1 failed to build with gtk/gtk.h: No such file or directory

    Do you know the full package name for this. I've looked in synaptic package manager, and can't find a gtk+dev package, or something similar.

  4. #4
    Join Date
    Jun 2009
    Posts
    66
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT 4.5.1 failed to build with gtk/gtk.h: No such file or directory

    I installed some gtk x11 extra lib, but that didn't sort things out, so I've been editing the QT makefile that was failing, adding in the missing include paths.

    Now I get the following error link errors :-

    .obj/release-shared/qgtkstyle.o: In function `.L4043':
    /home/aculab/qt/qtsdk-2009.02/qt/src/gui/styles/qgtkstyle.cpp:635: undefined reference to `g_object_get'
    .obj/release-shared/qgtkstyle.o: In function `.L4047':
    /home/aculab/qt/qtsdk-2009.02/qt/src/gui/styles/qgtkstyle.cpp:603: undefined reference to `g_object_get'
    .obj/release-shared/qgtkstyle.o: In function `.L4106':
    /home/aculab/qt/qtsdk-2009.02/qt/src/gui/styles/qgtkstyle.cpp:483: undefined reference to `g_object_get'
    .obj/release-shared/gtksymbols.o: In function `getGConfString':
    /home/aculab/qt/qtsdk-2009.02/qt/src/gui/styles/gtksymbols.cpp:345: undefined reference to `g_type_init'
    /home/aculab/qt/qtsdk-2009.02/qt/src/gui/styles/gtksymbols.cpp:353: undefined reference to `g_object_unref'
    .obj/release-shared/gtksymbols.o: In function `setupGtkFileChooser':
    /home/aculab/qt/qtsdk-2009.02/qt/src/gui/styles/gtksymbols.cpp:742: undefined reference to `g_object_set'
    /home/aculab/qt/qtsdk-2009.02/qt/src/gui/styles/gtksymbols.cpp:743: undefined reference to `g_object_set'
    .obj/release-shared/gtksymbols.o: In function `QGtk:penFilenames(QWidget*, QString const&, QString const&, QString const&, QString*, QFlags<QFileDialog::Option>)':
    /home/aculab/qt/qtsdk-2009.02/qt/src/gui/styles/gtksymbols.cpp:858: undefined reference to `g_object_set'
    .obj/release-shared/gtksymbols.o: In function `add_widget_to_map':
    /home/aculab/qt/qtsdk-2009.02/qt/src/gui/styles/gtksymbols.cpp:445: undefined reference to `g_type_check_instance_is_a'
    .obj/release-shared/gtksymbols.o: In function `add_all_sub_widgets':
    /home/aculab/qt/qtsdk-2009.02/qt/src/gui/styles/gtksymbols.cpp:455: undefined reference to `g_type_check_instance_is_a'
    .obj/release-shared/gtksymbols.o: In function `setup_gtk_widget':
    /home/aculab/qt/qtsdk-2009.02/qt/src/gui/styles/gtksymbols.cpp:430: undefined reference to `g_type_check_instance_is_a'
    .obj/release-shared/gtksymbols.o: In function `QGtk::initGtkWidgets()':
    /home/aculab/qt/qtsdk-2009.02/qt/src/gui/styles/gtksymbols.cpp:679: undefined reference to `g_signal_connect_data'
    collect2: ld returned 1 exit status
    make[1]: *** [../../lib/libQtGui.so.4.5.1] Error 1

    Any ideas what libraries are missing?

    Has anyone built QT4.5.1 on unbuntu - I assume so. What ./configure options did they include?

  5. #5

    Default Re: QT 4.5.1 failed to build with gtk/gtk.h: No such file or directory

    ./configure -silent -opengl

    the gtk dev libs are listed under synaptic as

    libgtk2.0-dev

  6. #6
    Join Date
    Jun 2009
    Posts
    66
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT 4.5.1 failed to build with gtk/gtk.h: No such file or directory

    Installing libgtk2.0-dev resloved the issues on Ubuntu.

    I've now moved on to QT 4.5.2, which I've built on debian.

    Cheers everyone for the help.

Similar Threads

  1. some questions about install qwt
    By dycjiaoda in forum Qwt
    Replies: 1
    Last Post: 8th February 2011, 02:37
  2. How to handle: QtCore/qconfig.h: No such file or directory ?
    By owen_263 in forum Installation and Deployment
    Replies: 2
    Last Post: 7th April 2008, 10:54
  3. Replies: 2
    Last Post: 8th November 2007, 21:15
  4. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 16:21
  5. create file in another directory
    By raphaelf in forum Qt Programming
    Replies: 3
    Last Post: 16th February 2006, 11:04

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.