The libevent small example has been compiled and failed.

The following code is compiled through the brew installation libevent, on

mac, but it just doesn"t pass.

-sharpinclude <stdio.h>
-sharpinclude<event.h>
-sharpinclude<unistd.h>
-sharpinclude<event2/util.h>
int main(int argc, char const *argv[])
{
    struct event_base* base = event_base_new();
    return 0;
}

the error message is as follows:

Undefined symbols for architecture x86_64:
  "_event_base_new", referenced from:
  _main in main-d0e518.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v                                 
to see invocation)


Thank you!

Mar.23,2021

The libevent class library is missing from the

compile command. It should be like this

clang  xx.c  -levent
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b34804-2bf11.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b34804-2bf11.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?