Re: [sigc] How to include libsigc
- From: Ulrich Eckhardt <eckhardt satorlaser com>
- To: libsigc-list gnome org
- Subject: Re: [sigc] How to include libsigc
- Date: Tue, 14 Jun 2005 08:03:28 +0200
Paul Giblock wrote:
> #ifndef _WIDGET_H_
> #define _WIDGET_H_
I have no idea if it makes a diff, but I personally don't take chances in
this. Therefore: macros with an underscore and a capital are reserved to the
compiler/stdlib, never use them! Other than that, this include guard is sooo
generic that it almost cries for colliding with others (by other widgetsets).
Add some random data plus the creation date and you're much safer.
> #include <sigc++/sigc++.h>
This is supposed to work.
> widget.o: widget.cpp widget.h
> g++ ${CCFLAGS} -c widget.cpp `pkg-config --cflags --libs sigc
> ++-2.0`
>
>
> Unfortunately, this is what gcc spits out:
>
> g++ -Wall -O2 -c widget.cpp `pkg-config --cflags --libs sigc++-2.0`
> g++: -lsigc-2.0: linker input file unused because linking not done
C'mon, you should try to understand what pkg-config does and then fix this
warning.
> g++ -Wall -O2 -c agesmgr.cpp
> In file included from agesmgr.h:7,
> from agesmgr.cpp:3:
> widget.h:25:27: sigc++/sigc++.h: No such file or directory
This is a totally different file. Once you understood what pkg-config does you
will definitely be able to fix this one, too.
BTW: there is almost no difference between your way and the autotools
integration that Jeff described. The only difference is that the autotools
integration first checks for pkg-config, then for sigC++, then for the
appropriate version (btw: 2.06 == 2.6 in version numbers, ITYM 2.0.6) and
defines some macros to the pkg-conf output so you don't call it over and over
again.
cheers
Uli
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]