sigc undefined?



I guess I'm doing something stupid, but dunno what it could be.
Running this on Ubuntu Dapper.  Why isn't sigc not declared?  Did I
not install something correctly?

joe laptop:~/projects/gtkmm/hello_world$ g++ main.cpp `pkg-config
gtkmm-2.0 sigc++-2.0 --cflags --libs ` -o hello
main.cpp: In constructor 'Hello_World::Hello_World()':
main.cpp:20: error: 'sigc' has not been declared
main.cpp:20: error: 'mem_fun' was not declared in this scope


joe laptop:~/projects/gtkmm/hello_world$ cat main.cpp

#include <gtkmm/main.h>
#include <gtkmm/button.h>
#include <gtkmm/window.h>
#include <sigc++/sigc++.h>
#include <iostream>

class Hello_World : public Gtk::Window
{
 public:
   Hello_World();
   void on_button_clicked();
   Gtk::Button button_;
};

Hello_World::Hello_World()
 : button_("Hello World")
{
 set_border_width(10);
 button_.signal_clicked().connect(sigc::mem_fun(*this,
&Hello_World::on_button_clicked));
 add(button_);
 show_all();
}

void Hello_World::on_button_clicked()
{
 std::cout << "Hello World" << std::endl;
}

int main(int argc, char *argv[])
{
 Gtk::Main kit(argc, argv);
 Hello_World hello;
 Gtk::Main::run(hello);
}



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