我一直在关注此文档以从源代码编译 Wireshark:
http://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html
我从开始 > '所有程序' > Visual Studio 2008 > Visual Studio 工具 > Visual Studio 2008 命令提示符运行这些命令
我也在调用“C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat”,但我相信这可以通过 VS2008 命令提示符为我完成。
这是我的输出nmake -f Makefile.nmake verify_tools
:
Checking for required applications:
cl: /cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/BIN/cl
link: /cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/BIN/link
nmake: /cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/BIN/nmake
mt: /cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1/bin/mt
bash: /usr/bin/bash
bison: /usr/bin/bison
flex: /usr/bin/flex
env: /usr/bin/env
grep: /usr/bin/grep
/usr/bin/find: /usr/bin/find
peflags: /usr/bin/peflags
perl: /usr/bin/perl
C:\Python27\python.exe: /cygdrive/c/Python27/python.exe
sed: /usr/bin/sed
unzip: /usr/bin/unzip
wget: /usr/bin/wget
在此之后,我继续运行命令:
nmake -f Makefile.nmake setup
nmake -f Makefile.nmake distclean
nmake -f Makefile.nmake all
调用最后一个命令('all')后,编译运行了几分钟,来到tshark-tap-register.c
tshark-tap-register.c(6) : error C2182: 'File' : illegal use of type 'void'
tshark-tap-register.c(6) : error C2146: syntax error : missing ';'
before identifier 'STDIN'
它以这种方式继续,引用越来越多的行号具有相同的错误。最后,它停止,输出:
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : return code '0x2'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
如果有人对尝试的事情有建议,我将不胜感激!