[Libevent-users] event.c:166 clock_gettime undefined reference

Hor Meng Yoong yoonghm at gmail.com
Wed Oct 17 10:24:13 EDT 2007


Hi:

  clock_gettime needs to use librt library. Include with -lrt.
When you have compiled it successfully using -levent, check with ldd to see
which library it links to.

Regards
Hor Meng

On 10/17/07, Sun Yi-Ming <dolmens at gmail.com> wrote:
>
> Hi guys, when I compile my simple test file which just has an
> event_init() against the static library libevent.a, I got an error
> message which said that "event.c:166 clock_gettime undefined
> reference"(something like that, I uses a non-english locale debain.).
> But if I compile against the shared library -levent, all is ok. what
> happened?
>
> gcc (GCC) 4.1.2
> Debian 4.1.1-21
> --
> Sincerely,
>
> ËïÒ»Ãù Simon Sun
> --
> Be a man with simple interface.
>
> _______________________________________________
> Libevent-users mailing list
> Libevent-users at monkey.org
> http://monkey.org/mailman/listinfo/libevent-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://monkeymail.org/archives/libevent-users/attachments/20071017/23e55bf8/attachment.htm


More information about the Libevent-users mailing list