按照libevent的文檔,使用VC的nmake -f Makefile.nmake便可編譯32位release模式。
由於項目中要求編譯64位的版本,須要在Makefile.nmake中添加一個LIBFLAGS選項 /MACHINE:X64
若是要加調試信息,能夠在 CFLAGS中加入/Zi,32位加調試選項是 CFLAGS中加/ZI,固然要調整優化選項/Ox shell
要正確運行"nmake -f Makefile.nmake",請走
"microsoft visual studio -> visual tools -> visual studio command prompt"
x64 走
"microsoft visual studio -> visual tools -> visual studio x64 win64 command prompt"
windows
至於
"visual studio x64 win64 command prompt"
和
"visual studio x64 cross tools command prompt"
的區別/困惑,看
http://artemgrygor.wordpress.com/2010/10/06/writing-windows-shell-extension-context-menu-with-icon-in-c-4-0/wordpress
或得些許啓發優化