I tried building your latest libev-1.3e with eventxx on Red Hat with: $ gcc --version gcc (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)
with the following flags to workaround a priority event issue: -Dev_flags=1 -DEVLIST_ACTIVE=1. This both solves a compile error and actually causes a priority function call to throw an exception. First I got the following errors: ./eventxx: In destructor `eventxx::dispatcher::~dispatcher()': ./eventxx:794: error: cannot convert `eventxx::internal::event_base*' to `event_base*' for argument `1' to `void eventxx::internal::event_base_free(event_base*)' Very strange, but by declaring struct event_base at the beginning of event.h, right before the struct event, solved my problem. I suspect this to be an old gcc bug-I did not see this on OSX gcc (4.0-something). I hope you will consider something like the following patch, which solved my problem. I was able to get a bufferevent read I/O to work with libev. $ diff -u ~/libev-1.3e/event.h . --- /home/chbrody/libev-1.3e/event.h 2007-11-08 22:14:34.000000000 +0100 +++ ./event.h 2007-11-09 12:42:12.000000000 +0100 @@ -37,6 +37,8 @@ extern "C" { #endif +struct event_base; + struct event { /* libev watchers we map onto */ @@ -111,7 +113,7 @@ int event_priority_init (int npri); int event_priority_set (struct event *ev, int pri); -struct event_base; +//struct event_base; int event_base_set (struct event_base *base, struct event *ev); int event_base_loop (struct event_base *base, int); (or just remove the 2nd, now-redundant declaration of struct event_base). Thanks, CB _______________________________________________ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users