- Download
http://jaist.dl.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz
- Build
$ ./configure --prefix=/mingw
$ ./configure && make
$ make install
Cant seem to build libevent for mingw32... tried 2.0.22 and the newer 2.1.8 I get
make[2]: Entering directory /home/Chris/libevent' /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./compat -I./include -I./include -IWIN32-Code -g -O2 -Wall -fno-strict-aliasing -MT listener.lo -MD -MP -MF .deps/listener.Tpo -c -o listener.lo listener.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./compat -I./include -I./include -IWIN32-Code -g -O2 -Wall -fno-strict-aliasing -MT listener.lo -MD -MP -MF .deps/listener.Tpo -c listener.c -DDLL_EXPORT -DPIC -o .libs/listener.o listener.c: In function 'start_accepting': listener.c:568:16: error: 'ERROR_IO_PENDING' undeclared (first use in this function) if (error != ERROR_IO_PENDING) { ^~~~~~~~~~~~~~~~ listener.c:568:16: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [listener.lo] Error 1 make[2]: Leaving directory
/home/Chris/libevent'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Chris/libevent'
make: *** [all] Error 2
I also same error when building libevent-2.1.8 with mingw32.
I fixed this error by adding the following code into the bottom of file "config.h":
#include <winerror.h>
The download link didnt work but a manual download from Sourceforge worked fine.
👍