libsigc++ on Ubuntu - won't compile
Hi all,
Does anyone have any experience with libsigc++ (1.2 or 2.0) on Linux? I'm currently working on a C++ console application (using Eclipse) that has a few classes and I wanted to enable certain classes to raise events back to event handlers in main.cpp. I came across libsigc++-2.0 but am having problems actually using it. It installs just fine on my Ubuntu 9.04 box (both the runtime and dev packages) but I'm not sure what to actually #include in my source code. I tried following the tutorial on the libsigc++ site (Chapter 2. Connecting your code to signals) but it doesn't give any information on what libsigc++ headers I need. I think I narrowed it down to #include <sigc++-2.0/sigc++/signals.h>, but I am getting hundreds of compiler errors similar to " '_A_a1_' was not declared in this scope" referencing signal.h. Following is some code for my class header. I haven't put anything into the implementation file yet, or main.cpp. Code:
#include <pthread> On a side note: For some reason, if I remove 'int' from the MySignal1 or MySignal2 declaration (e.g., sigc::signal<void> MySignal1;, the compiler tells me I have an invalid entry for argument 2. I thought signal was supposed to be a wrapper so only the first argument (the template's return type) is required. |
All times are GMT -5. The time now is 09:10 PM. |