[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GLib
>>>>> Marcus Lunzenauer writes:
Marcus> da ich leider nicht im Skript finden konnte, wie man Sachen
Marcus> mit Glib übersetzt, habe ich ins Makefile geschaut; stimmt
Marcus> es das man dafür:
Marcus> `pkg-config --cflags gnet`
Marcus> und
Marcus> `pkg-config --libs gnet`
Marcus> benötigt?
Aus der pkg-config(1) manual page:
DESCRIPTION
The pkg-config program is used to retrieve information
about installed libraries in the system. It is typically
used to compile and link against one or more libraries.
Here is a typical usage scenario in a Makefile:
program: program.c
cc program.c `pkg-config --cflags --libs gnomeui`
pkg-config retrieves information about packages from spe-
cial metadata files. These files are named after the pack-
age, with the extension .pc. By default, pkg-config looks
in the directory prefix/lib/pkgconfig for these files; it
will also look in the colon-separated (on Windows, semi-
colon-separated) list of directories specified by the
PKG_CONFIG_PATH environment variable.
The package name specified on the pkg-config command line
is defined to be the name of the metadata file, minus the
.pc extension. If a library can install multiple versions
simultaneously, it must give each version its own name
(for example, GTK 1.2 might have the package name "gtk+"
while GTK 2.0 has "gtk+-2.0").
Die Idee ist, dass das Makefile nicht wissen muss, welche Compiler
Optionen genau gesetzt werden muessen auf der aktuellen Plattform.
Marcus> Wofür ist dies gut?:
Marcus> -Wno-parentheses -Wno-import
Aus der gcc(1) manual page:
-Wno-import
Inhibit warning messages about the use of #import.
-Wparentheses
Warn if parentheses are omitted in certain contexts, such as when
there is an assignment in a context where a truth value is
expected, or when operators are nested whose precedence people
often get confused about.
Das -Wno-parentheses schaltet -Wparentheses aus.
/js
--
Juergen Schoenwaelder <http://www.informatik.uni-osnabrueck.de/schoenw/>
- References:
- GLib
- From: Marcus Lunzenauer <marcus.lunzenauer@osnanet.de>