|
Happily, libevent will now build out of the box on Windows (at least with VC2003 and VC2008, I haven't tested others). I don't like their projects though, so I created a cmake build system for it.
cmake files: libevent-cmake.zip
How to use:
Download and install cmake 2.6 for Windows
Download libevent 1.4.12 from the libevent website and extract all files
Download the libevent-cmake package above and extract it into the libevent directory created above
Open a command prompt in the libevent top directory
Execute the vcvars32.bat or vsvars32.bat or vsvars64.bat file from the Visual Studio directory to allow building on the command line.
e.g. "C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat"
Call the cross-build.cmd batch file suppling the version of Visual Studio as the first parameter. See the contents of the cross-build.cmd file for all possibilities.
This will build the Visual Studio project and solution files for libevent, samples and tests and then build them for all configurations (debug, release, etc). All generated files are stored in a sub-directory using the name of the tools.
e.g. "cross-build.cmd msvc-7.1" for Visual Studio 7 .NET 2003. All files will be in the "msvc-7.1" subdirectory.
You can link to the library in the appropriate lib directory: libevent/{toolset}/lib/{config}/libevent.lib
e.g. libevent/msvc-7.1/lib/release/libevent.lib
You can run the samples and tests in the appropriate bin directory: libevent/{toolset}/bin/{config}/
e.g. libevent/msvc-7.1/bin/debug/regress.exe
Notes:
|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )
GMT+8, 2024-5-9 15:11 , Processed in 0.038536 second(s), 5 queries , Gzip On, Redis On.
Powered by Discuz! X3.5 Licensed
© 2001-2023 Discuz! Team.