简体   繁体   English

建立Wireshark时的错误和警告

[英]Errors and Warnings while building Wireshark

I am trying to build Wireshark on Windows by following the steps given here - https://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html . 我正在尝试按照此处提供的步骤在Windows上构建Wireshark- https://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html But I am running into weird errors and warning during building Wireshark. 但是在构建Wireshark时遇到了奇怪的错误和警告。 The errors I am getting are described below. 我得到的错误描述如下。

 "C:\Development\wsbuild64\Wireshark.sln" (default target) (1) ->
   "C:\Development\wsbuild64\text2pcap.vcxproj.metaproj" (default target) (44) ->
   "C:\Development\wsbuild64\text2pcap.vcxproj" (default target) (90) ->
   (ClCompile target) ->
     C:/Development/wsbuild64/text2pcap-scanner.c(993): error C2220: warning treated as error - no 'object' file ge
   nerated [C:\Development\wsbuild64\text2pcap.vcxproj]


   "C:\Development\wsbuild64\Wireshark.sln" (default target) (1) ->
   "C:\Development\wsbuild64\wiretap\wiretap.vcxproj.metaproj" (default target) (56) ->
   "C:\Development\wsbuild64\wiretap\wiretap.vcxproj" (default target) (87) ->
     C:/Development/wsbuild64/wiretap/ascend.c(429): error C2220: warning treated as error - no 'object' file gener
   ated [C:\Development\wsbuild64\wiretap\wiretap.vcxproj]

I am also getting some warnings which are described below. 我也收到一些警告,如下所述。

"C:\Development\wsbuild64\Wireshark.sln" (default target) (1) ->
   "C:\Development\wsbuild64\text2pcap.vcxproj.metaproj" (default target) (44) ->
   "C:\Development\wsbuild64\text2pcap.vcxproj" (default target) (90) ->
   (ClCompile target) ->
     C:/Development/wsbuild64/text2pcap-scanner.c(993): warning C4003: not enough arguments for function-like macro
    invocation 'text2pcap_wrap' [C:\Development\wsbuild64\text2pcap.vcxproj]


   "C:\Development\wsbuild64\Wireshark.sln" (default target) (1) ->
   "C:\Development\wsbuild64\wiretap\wiretap.vcxproj.metaproj" (default target) (56) ->
   "C:\Development\wsbuild64\wiretap\wiretap.vcxproj" (default target) (87) ->
     C:/Development/wsbuild64/wiretap/ascend.c(429): warning C4273: 'malloc': inconsistent dll linkage [C:\Developm
   ent\wsbuild64\wiretap\wiretap.vcxproj]
     C:/Development/wsbuild64/wiretap/ascend.c(436): warning C4273: 'free': inconsistent dll linkage [C:\Developmen
   t\wsbuild64\wiretap\wiretap.vcxproj]

I tried building the thing by using the following command so that I do not get the warning as an error. 我尝试通过使用以下命令来构建该事物,以使我不会将警告作为错误。 But I still get the same error and the build fails - 但是我仍然遇到相同的错误,构建失败-

msbuild /m /warnasmessage:C2220 /p:Configuration=RelWithDebInfo Wireshark.sln

What can be done in this case? 在这种情况下可以做什么?

If someone faces the same issue, make sure that you have installed all the required packages before you attempt to build Wireshark. 如果有人遇到相同的问题,请在尝试构建Wireshark之​​前确保已安装所有必需的软件包。 In this case, I forgot to install Perl, Bison and Flex. 在这种情况下,我忘记安装Perl,Bison和Flex。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM