Re: [sigc] How to include libsigc



I take that back, it doesn't run at all. Here are the first few lines of
the header in question:

--- file: widget.h ---

#ifndef _WIDGET_H_
#define _WIDGET_H_
#include <string>
#include <vector>
#include <sigc++/sigc++.h>

#include "point.h"
#include "size.h"
#include "rect.h"
#include "event.h"

namespace AGES 
{

	// Class Widget
	// 
	class Widget : public sigc::trackable 
	{

	// Public stuff
	public:

		typedef Widget* whandle;
	
		// Constructors
		Widget();
		Widget(Widget* parent);
		Widget(Widget* parent, const std::string& name);

		virtual ~Widget();

		// Accessors 
		std::string GetName() const;
		void SetName(const std::string& name);

		...

--- end file ---


Here is the rule from the makefile:

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
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
In file included from agesmgr.h:7,
                 from agesmgr.cpp:3:
widget.h:37: error: `sigc' has not been declared
widget.h:38: error: expected class-name before '{' token


First, it doesn't find my .h file.  But if I make an symbolic link
in /usr/include then it returns hundreds of errors like in my first
email.  Its rather frustrating because I followed the rules in the
tutorial (even though it doesn't tell you what to include).  I know
libsigc++ is installed properly because I use Gentoo Linux and I
compiled Gnome just fine.  Sorry if I'm flooding this group, but this is
the only means of support I have been able to find.

Thanks,
Paul






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]