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
Re: QT 4.5.1 failed to build with gtk/gtk.h: No such file or directory
How about installing gtk+ development files too?
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.
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::openFilenames(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?
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
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.