PDA

View Full Version : Qt Static Compile Error on Linux - Missing gtk.h file



smh123
18th February 2011, 18:00
Hi,
This is my first attempt at working with Qt and I need to make static executables. I'm working with Qt 4.70 on Ubuntu 10.04. I'm following the instructions on how to build Qt statically at http://doc.qt.nokia.com/4.5/deployment-x11.html

I do the following:

cd /opt/qtsdk-2010.05/qt
./configure -static -prefix /opt/qtsdk-2010.05/qt
make sub-src

After the make command I get an error that some gtk related files can't be found:
...
In file included from ../../include/QtGui/private/qgtkstyle_p.h:1, from kernel/qguiplatformplugin.cpp:63: and how to install it
../../include/QtGui/private/../../../src/gui/styles/qgtkstyle_p.h:69:21: error: gtk/gtk.h: No such file or directory

I'm guessing there is a GTK package that needs to be installed. Can someone point me to what's the package name? (assuming this is the problem of course)

Also, I tried issuing the 'configure' command with the '-no-gtkstyle' prior to issuing the make command. I got the same results.

ChrisW67
18th February 2011, 22:19
The package is probably libgtk2.0-dev or something similar.

konserw
28th February 2011, 23:14
hi!
I've got (sadly) the same problem, eaven after whole day googling for solution.
I'm using newest x64 ubuntu, and yes I've got installed gtk libraries.
Thanks in advance for any help!

P.S. i've found this header file (gtk.h) in my usr/include/gtk-2.0/gtk folder but that error still ocurs. How may i telll QT to look for headers there?