gtk/gtkunixprint.h: No such file or directory

544 views
Skip to first unread message

herb...@gmail.com

unread,
Jan 13, 2013, 9:41:04 PM1/13/13
to wx-u...@googlegroups.com
I get "gtk/gtkunixprint.h: No such file or directory" when trying to build svn 73369 on debian wheezy. (I had the same error on raspbian which led me to try wheezy.)

The /usr/include/gtk-3.0/gtk directory contains many headers -- but neither of the two headers expected by the following fragment of src/gtk/print.cpp
#if GTK_CHECK_VERSION(2,14,0)
#include <gtk/gtkunixprint.h>
#else
#include <gtk/gtkpagesetupunixdialog.h>
#endif

Any suggestions?

---//---

$  cd wxWidgets-trunk-build
$ ../wxWidgets-trunk/configure CXXFLAGS='-std=c++11'
$ make CXXFLAGS='-std=c++11'

/home/user1/wxWidgets-trunk-build/bk-deps g++ -c -o coredll_gtk_print.o -I./.pch/wxprec_coredll -D__WXGTK__      -DWXBUILDING -I/home/user1/wxWidgets-trunk-build/src/tiff/libtiff -I../wxWidgets-trunk/src/tiff/libtiff -I../wxWidgets-trunk/src/jpeg   -I../wxWidgets-trunk/src/regex  -DWXUSINGDLL -DWXMAKINGDLL_CORE -DwxUSE_BASE=0 -fPIC -DPIC -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -D_FILE_OFFSET_BITS=64 -I/home/user1/wxWidgets-trunk-build/lib/wx/include/gtk3-unicode-2.9 -I../wxWidgets-trunk/include -pthread -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -std=c++11 ../wxWidgets-trunk/src/gtk/print.cpp
../wxWidgets-trunk/src/gtk/print.cpp:42:30: fatal error: gtk/gtkunixprint.h: No such file or directory
compilation terminated.
make: *** [coredll_gtk_print.o] Error 1

---//---

Regards,
Herb Thompson

Steve Barnes

unread,
Jan 14, 2013, 12:59:10 AM1/14/13
to wx-u...@googlegroups.com
On 14/01/13 02:41, herb...@gmail.com wrote:
I get "gtk/gtkunixprint.h: No such file or directory" when trying to build svn 73369 on debian wheezy. (I had the same error on raspbian which led me to try wheezy.)

The /usr/include/gtk-3.0/gtk directory contains many headers -- but neither of the two headers expected by the following fragment of src/gtk/print.cpp
#if GTK_CHECK_VERSION(2,14,0)
#include <gtk/gtkunixprint.h>
#else
#include <gtk/gtkpagesetupunixdialog.h>
#endif
Try:
sudo apt-get install libgtk2.0-dev

--
Steve Gadget Barnes

Vadim Zeitlin

unread,
Jan 14, 2013, 8:05:39 PM1/14/13
to wx-u...@googlegroups.com
On Sun, 13 Jan 2013 18:41:04 -0800 (PST) wrote:

> I get "gtk/gtkunixprint.h: No such file or directory" when trying to build
> svn 73369 on debian wheezy. (I had the same error on raspbian which led me
> to try wheezy.)

The file /usr/include/gtk-unix-print-2.0/gtk/gtkunixprint.h is part of
libgtk2.0-dev package on my Debian system.

> The /usr/include/gtk-3.0/gtk directory contains many headers

Are you building wxWidgets with GTK+ 3.0? This is still somewhat
experimental (even though compiling it should still work), and so needs to
be enabled explicitly.

So how did you run configure and what did it say in the summary at the end?

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/

Herb Thompson

unread,
Jan 14, 2013, 8:56:44 PM1/14/13
to wx-u...@googlegroups.com
On 2013-01-14 1:59 AM, Steve Barnes wrote:
> Try:
> sudo apt-get install libgtk2.0-dev

Thanks. That solved my problem.

Herb Thompson

unread,
Jan 14, 2013, 8:56:54 PM1/14/13
to wx-u...@googlegroups.com
On 2013-01-14 9:05 PM, Vadim Zeitlin wrote:
> On Sun, 13 Jan 2013 18:41:04 -0800 (PST) wrote:
>
>> I get "gtk/gtkunixprint.h: No such file or directory" when trying to build
>> svn 73369 on debian wheezy. (I had the same error on raspbian which led me
>> to try wheezy.)
>
> The file /usr/include/gtk-unix-print-2.0/gtk/gtkunixprint.h is part of
> libgtk2.0-dev package on my Debian system.
>
>> The /usr/include/gtk-3.0/gtk directory contains many headers
>
> Are you building wxWidgets with GTK+ 3.0? This is still somewhat
> experimental (even though compiling it should still work), and so needs to
> be enabled explicitly.

The grief came about because I had foolishly installed libgtk-3-dev
instead of libgtk2.0-dev so I was accidentally trying to use gtk3. If I
recall correctly, configure did say it was using gtk3 but the make
failed as indicated above.

Installing libgtk2.0-dev as suggested by Steve Barnes solved my problem
on wheezy (my Raspberry Pi is still working on the make as I write this).

Thanks for your reply and sorry for the distraction.

Regards,
Herb Thompson

Reply all
Reply to author
Forward
0 new messages