Libevent官网:http://libevent.org/
windows 7下编译:
编译环境: windows 7 + VS2010
(1)解压libevent到F:\libevent\libevent-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-stable\event_iocp.c
libevent-2.0.21-stable\evthread_win32.c
libevent-2.0.21-stable\listener.c
(4)使用VS命令提示工具编译:
cd/d F:\libevent\libevent-2.0.21-stable
nmake /f Makefile.nmake
时间: 2024-10-13 11:37:23