@echo offset baseDir=%cd%set WIRESHARK_LIB_DIR=%baseDir%/libs/wireshark-win32-libs-2.2set WIRESHARK_LIBS=%baseDir%/libs/wireshark-win32-libs-2.2set WIRESHARK_CYGWIN_INSTALL_PATH=D:\GNU\CygWinset DEVENVCOM="%VS120COMNTOOLS%..\..\Common7\IDE\devenv.com"cd buildcmake -G"Visual Studio 12 2013" ../wireshark-2.2.1%DEVENVCOM% Wireshark.sln /rebuild "Debug|Win32"pause
建议使用vs 2013,vs2015编译报错
参考:http://blog.csdn.net/mawu_1014/article/details/51693766
设置cygwin组件,如果安装遗漏可以在http://mirrors.163.com/cygwin/x86_64/release/找到对应的包,解压放入对应目录
下载https://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/所有程序和库,放在目录wireshark-win32-libs-2.2
将上面的批处理脚本保存位build.bat,修改对应目录:cygwin + WIRESHARK_LIB_DIR + WIRESHARK_LIBS
目录结构如下: