[getdns-api] Inclusion of event libraries in getdns

Paul Hoffman paul.hoffman at vpnc.org
Wed May 21 19:46:02 MST 2014


Even after fixing the location for getdns_libevent.h, the examples fail.

# gcc -std=c99 -c -fPIC -pedantic -g -I./ -Werror -Wall -Wextra -c fixed-example-simple-answers.c
fixed-example-simple-answers.c: In function ‘main’:
fixed-example-simple-answers.c:73:2: error: implicit declaration of function ‘event_base_new’ [-Werror=implicit-function-declaration]
  this_event_base = event_base_new();
  ^
fixed-example-simple-answers.c:73:18: error: assignment makes pointer from integer without a cast [-Werror]
  this_event_base = event_base_new();
                  ^
fixed-example-simple-answers.c:92:3: error: implicit declaration of function ‘event_base_free’ [-Werror=implicit-function-declaration]
   event_base_free(this_event_base);
   ^
fixed-example-simple-answers.c:99:3: error: implicit declaration of function ‘event_base_dispatch’ [-Werror=implicit-function-declaration]
   int dispatch_return = event_base_dispatch(this_event_base);
   ^
cc1: all warnings being treated as errors

Is this due to the getdns library being put together wrong? Or is this something wrong with the examples that no one noticed?

FWIW, I put together getdns from source using "./configure --with-libevent".

--Paul Hoffman


More information about the getdns-api mailing list