This is our old Q&A Site. Please post any new questions and answers at

I got an error while compiling wireshark.

erf.c erf.c(654) : error C2220: warning treated as error - no 'object' file generated erf.c(654) : warning C4244: '=' : conversion from 'gint64' to 'int', possible lo ss of data mp2t.c mp2t.c(121) : error C2220: warning treated as error - no 'object' file generated

mp2t.c(121) : warning C4244: '=' : conversion from 'guint64' to 'int', possible loss of data Generating Code... NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Platform SDK\Bin\nmake.e xe"' : return code '0x2' Stop.

i find many post on internet and forum i found that it can be avoided by doing

In the top-level Wireshark directory config.h:

Comment out the following if warnings are not to be treated as errors


but in config.h i didn't find this tag.

Wireshark version - 1.8.3 OS - Windows 7 Visual studio 2005.

i followed link to build the code.

asked 06 Nov '12, 22:10

ishan's gravatar image

accept rate: 0%

WARNINGS_ARE_ERRORS is in config.nmake (for Windows builds). In the release versions (e.g., 1.8.3) then it should already be commented out. So I'm not sure why you're getting "warning treated as error"...

(07 Nov '12, 10:12) JeffMorriss ♦

The instructions in the link you provided are based on a very old toolchain (VS2005) but look like they should work. I'm not aware of that many people building with VS2005 these days, and you may have more success with a more up to date toolchain, e.g. VS2010 Express.

The definitive guide to building Wireshark is the Wireshark Developers Guide that is kept current by Wireshark Core Developers. You must follow each step in the Guide to the letter, omitting or varying any steps is likely to lead to build failures.

Finally, have you made any modifications to the source files before attempting the build (apart from config.nmake)? If so, please try to complete a build with unmodified source files first just to prove your build environment.

permanent link

answered 07 Nov '12, 00:19

grahamb's gravatar image

grahamb ♦
accept rate: 22%

Thanks grahamb ,

i followed the steps there and i was able to install and build Wireshark.

Two observation which i want to mention which will help users.

  1. Their might be issues during installation of Visual studio 2010 , while installing silverlight it might rollback the installation. To avoid that , uninstall the all silverlight version from Add nad remove programs in control pannel and if their are issues during uninstall process of silverlight then go to and fix the problem by running it.
  2. It is usual that during installation of visual studio 2010 , after downloading all packages , the setup itself rollback. So don't worry , it is installed on your system and move to next step in installation guide.
(07 Nov '12, 22:19) ishan
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 06 Nov '12, 22:10

question was seen: 2,927 times

last updated: 08 Nov '12, 00:24

p​o​w​e​r​e​d by O​S​Q​A