Re: [Debian]: glibconfig.h: Datei oder Verzeichnis nicht gefunden
Martin Anselm Meyerhoff hat gesagt: // Martin Anselm Meyerhoff wrote:
> Hi!
>
> Ich kann kein gtk+ Program kompilieren. libgtk-dev und libglib-dev sind
> installiert. Meldung:
>
> $ gcc gtk.c
> In file included from /usr/include/gdk/gdktypes.h:25,
> from /usr/include/gdk/gdk.h:23,
> from /usr/include/gtk/gtk.h:23,
> from gtk.c:1:
> /usr/include/glib.h:22:
> glibconfig.h: Datei oder Verzeichnis nicht gefunden
>
> In welchem Paket ist dieses Headerfile?
Ich gehe mal davon aus, dass du die nötigen *-dev-Pakete schon installiert
hast.
Das Problem, dass glibconfig.h nicht gefunden wird, ist in den GTK-FAQs
erklärt:
2.6 When compiling programs with GTK+, I get compiler error messages about not
being able to find "glibconfig.h".
The header file "glibconfig.h" was moved to the directory
$exec_prefix/lib/glib/include/. $exec_prefix is the directory that was
specified by giving the --exec-prefix flags to ./configure when
compiling GTK+. It defaults to $prefix, (specified with --prefix),
which in turn defaults to /usr/local/.
This was done because "glibconfig.h" includes architecture dependent
information, and the rest of the include files are put in
$prefix/include, which can be shared between different architectures.
GTK+ includes a shell script, gtk-config, that makes it easy to find
out the correct include paths. The GTK+ tutorial includes an example
of using gtk-config for simple compilation from the command line. For
information about more complicated configuration, see the file
docs/gtk-config.txt in the GTK+ distribution.
If you are trying to compile an old program, you may be able to work
around the problem by configuring it with a command line like:
CPPFLAGS="-I/usr/local/include/glib/include" ./configure
for Bourne-compatible shells like bash, or for csh variants:
setenv CPPFLAGS "-I/usr/local/include/glib/include"
./configure
Für das Komplieren von GTK-Programmen sollte man also gtk-config
etwa folgendermassen nutzen:
$ cc `gtk-config --libs` `gtk-config --cflags` gtk.c
--
__ __
Frank Barknecht ____ ______ ____ __ trip\ \ / /wire ______
/ __// __ /__/ __// // __ \ \/ / __ \\ ___\
/ / / ____/ / / / // ____// /\ \\ ___\\____ \
/_/ /_____/ /_/ /_//_____// / \ \\_____\\_____\
/_/ \_\
------------------------------------------------
Um sich aus der Liste auszutragen schicken Sie
bitte eine E-Mail an majordomo@jfl.de die im Body
"unsubscribe debian-user-de <your_email_address>"
enthaelt.
Bei Problemen bitte eine Mail an: Jan.Otto@jfl.de
------------------------------------------------
Anzahl der eingetragenen Mitglieder: 557
Reply to: