简体   繁体   中英

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 . But I am running into weird errors and warning during building 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. In this case, I forgot to install Perl, Bison and Flex.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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