Meaning of "cflags"
Daniel Macks
dmacks at netspace.org
Sun Feb 24 22:30:02 PST 2008
On Mon, Feb 25, 2008 at 07:17:05AM +0100, Tollef Fog Heen wrote:
> * Daniel Macks
>
> | I'm a bit confused by what pkg-config means by "cflags", specifically,
> | whether it means "flags for the c-language compiler, all stages" or
> | "flags for the precompiler, all languages". That is, is the Cflags
> | field supposed to contain flags for linking as well, or only flags for
> | source compiling (e.g., .c -> .o)?
>
> My understanding is it has just been used for compiling, so ??compiler
> flags?? which includes preprocessor flags (such as -D for cc/gcc). I
> don't think this is written down anywhere, but from what I have seen
> of .pc files around, this is what people are using it for as well.
>
> | Actually, that original isn't even functionally correct, because the
> | Makefile target is "program" but there's no flag to cc to override the
> | default output of "a.out".
>
> -o ?
Right. *I* know how it *could* be done. My point is that the manpage
is wrong ("there's no" refers to the example, not the compiler
itself). The -o flag is not used:
program: program.c
cc program.c `pkg-config --cflags --libs gnomeui`
dan
--
Daniel Macks
dmacks at netspace.org
http://www.netspace.org/~dmacks
More information about the pkg-config
mailing list