[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] undefined reference to `bufferevent_get_input'
On Wed, Aug 31, 2011 at 09:00:17PM +0800, lx wrote:
> hello, i'm a new one , begin to use libevent. i've installed it in ubuntu10.
>
> by ./configure, make , sudo make install.
> but when i complie a example, it can't work.* the errors is:*
>
> ---------------------------------------------------------------------------------------------------------------------------------------------------
> lx@lx-Inspiron-1420:~/c/libevent/demo$ gcc -o test_listener -g -levent
> test_listener.c
> /tmp/ccMQJO33.o: In function `echo_read_cb':
> /home/lx/c/libevent/demo/test_listener.c:16: undefined reference to
> `bufferevent_get_input'
> /home/lx/c/libevent/demo/test_listener.c:17: undefined reference to
> `bufferevent_get_output'
> /tmp/ccMQJO33.o: In function `accept_conn_cb':
> /home/lx/c/libevent/demo/test_listener.c:39: undefined reference to
> `evconnlistener_get_base'
> /home/lx/c/libevent/demo/test_listener.c:40: undefined reference to
> `bufferevent_socket_new'
> /tmp/ccMQJO33.o: In function `accept_error_cb':
> /home/lx/c/libevent/demo/test_listener.c:51: undefined reference to
> `evconnlistener_get_base'
> /tmp/ccMQJO33.o: In function `main':
> /home/lx/c/libevent/demo/test_listener.c:92: undefined reference to
> `evconnlistener_new_bind'
> /home/lx/c/libevent/demo/test_listener.c:99: undefined reference to
> `evconnlistener_set_error_cb'
> collect2: ld returned 1 exit status
>
You haven't done an install, so the linker is probably using your old
version of libevent (in the ld search path).
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.