Libevent官网:http://libevent.org/
windows 7下编译:
编译环境: windows 7 + VS2010
(1)解压libevent到F:libeventlibevent-2.0.21-stable
(2)打开Microsoft visual studio 2010命令行工具或者(call "C:/Program Files/Microsoft Visual Studio 10.0/VC/bin/vcvars32.bat" ) 设置vc10环境
(3)修改以下三个文件,添加宏定义:
在以下3个文件开头添加“#define _WIN32_WINNT 0x0500”
libevent-2.0.21-stableevent_iocp.c
libevent-2.0.21-stableevthread_win32.c
libevent-2.0.21-stablelistener.c
(4)使用VS命令提示工具编译:
cd/d F:libeventlibevent-2.0.21-stable
nmake /f Makefile.nmake