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

Error building Wireshark - Windows


After some issues with my PATH variable I finally got to build Wireshark. All went well until what looks like the final linker command, then I got the following error:

cl -c -nologo -Zm200 -Zc:wchar_t -FS /DWINPCAP_VERSION=4_1_3 /Zi /W3 /MD /O2 /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=1600 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -DPSAPI_VERSION=1 /MP /w34295 /w34189 /DNOMINMAX -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DWIN64 -DINET6 -DREENTRANT -DHAVE_PCAP_REMOTE -DHAVE_PCAP_SETSAMPLING -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WINEXTRAS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DNDEBUG -I"...." -I"....\wiretap" -I"C:\Wireshark-win64-libs\gtk2\include\glib-2.0" -I"C:\Wireshark-win64-libs\gtk2\lib\glib-2.0\include" -I"C:\Wireshark-win64-libs\gtk3\include\glib-2.0" -I"C:\Wireshark-win64-libs\gtk3\lib\glib-2.0\include" -I"C:\Wireshark-win64-libs\WpdPack\Include" -I"C:\Wireshark-win64-libs\AirPcap_Devpack_4_1_0_1622\Airpcap_Devpack\include" -I"C:\Wireshark-win64-libs\gnutls-3.2.15-2.9-win64ws\include" -I"C:\Wireshark-win64-libs\GeoIP-1.5.1-2-win64ws\include" -I"C:\Wireshark-win64-libs\zlib125\include" -I"C:\Qt\5.3\msvc2013_64\include" -I"C:\Qt\5.3\msvc2013_64\include\QtPrintSupport" -I"C:\Qt\5.3\msvc2013_64\include\QtWinExtras" -I"C:\Qt\5.3\msvc2013_64\include\QtWidgets" -I"C:\Qt\5.3\msvc2013_64\include\QtGui" -I"C:\Qt\5.3\msvc2013_64\include\QtANGLE" -I"C:\Qt\5.3\msvc2013_64\include\QtCore" -I"." -I"." -I"C:\Qt\5.3\msvc2013_64\mkspecs\win32-msvc2013" -Fo @C:\Users\Sid\AppData\Local\Temp\nm8A26.tmp cl : Command line error D8021 : invalid numeric argument '/FS' NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0 \VC\Bin\amd64\cl.EXE"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0 \VC\Bin\amd64\nmake.EXE"' : return code '0x2' Any help would be much appreciated, Sid.

asked 25 Nov '14, 08:08

sid%20Price's gravatar image

sid Price
accept rate: 0%

2 Answers:


Things have got messed up in your build environment. It may well be time to blow the Wireshark source directory away and grab the sources again and build from the beginning. You can keep the libs dir.

Changing compilers and x86\x64 choice in the same directory isn't recommended, pick one and stick to it. If you want to build an x64 version with QT, you need to be using VS2012 at a minimum, but I think you may then have to use Qt < 5.3 which has it's own issues. If you have VS2013 (and with the free Community Edition there is no cost) then I would recommend you use that. Note that the Dev Guide hasn't yet been fully updated for VS2013, I have some drafts for the docs but they're not ready yet.

Changing compiler and or x86\x64 choice can leave an incorrect ui\qt\config.pri file. Deleting that may help.

If using VS2013, this is the simplest method I can come up with, it doesn't require you to make any changes to configuration files etc. No changes to your PATH environment variable should be needed (as long as it doesn't have ...\Git\bin):

  • Open a Visual Studio command prompt (from the start menu, Visual Studio 2013 | Visual Studio Tools) either x86 Native or x64 Native as required.
  • Set some environment vars (adjusting paths or values to suit your build), I keep these in a batch file, note that WIRESHARK_BASE_DIR is a directory that contains the sources in a subdirectory "wireshark":
  • set CYGWIN=nodosfilewarning
  • set WIRESHARK_BASE_DIR=path\to\top\level\directory
  • set QT5_BASE_DIR=C:\Qt\Qt5.3.0\5.3\msvc2013
  • cd path\to\top\level\directory\wireshark
  • nmake -f makfile.nmake verify_tools
  • nmake -f makfile.nmake setup
  • nmake -f makfile.nmake

answered 26 Nov '14, 06:16

grahamb's gravatar image

grahamb ♦
accept rate: 22%

grahamb Thanks you, I will give this a try a little later and let you know how it goes.

The reason I would like to build both x86 and x64 is that I have a partner who is running Wireshark x86 and my computer is x64, we have a product with a custom protocol and having a dissector for it woule speed some of our system debugging. Thanks again, Sid.

(26 Nov '14, 07:12) sid Price

You can run the x86 build on x64 Windows, I do that all the time. Unless you specifically need the huge memory available in x64 (in which case working with such captures would be miserable) just stick with the x86 version.

(26 Nov '14, 07:30) grahamb ♦

Hello again,

I have deleted the Wireshark source tree and cloned it again from

I started to create the a batch file to set my environment variables for an x86 build and ran into a problem, my QT5 tree does not have a sub folder that looks like it is good for VS2013 and x86. I have the following only:

android_armv7 msvc2010_opengl msvc2013_64 winphone_arm winphone_x86 winrt_x64

What do I use for VS2013 x86?

I did try an x64 build with the following settings in a batch file:

set CYGWIN=nodosfilewarning set WIRESHARK_BASE_DIR=C:\DataRoot\Projects\Wireshark set WIRESHARK_TARGET_PLATFORM=win64 set QT5_BASE_DIR=C:\Qt\5.3\msvc2013_64\bin

I ran it in the VS 2013 x64 native compiler command window and then ran "nmake -f makefile.nmake verify_tools", I got the following error:

C:\DataRoot\Projects\Wireshark>nmake -f makefile.nmake verify_tools

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1 Copyright (C) Microsoft Corporation. All rights reserved.

makefile.nmake(8) : fatal error U1052: file 'win32.mak' not found Stop.

Any input much appreciated, Sid.

(26 Nov '14, 09:24) sid Price

For x86 qt you'll need to download the appropriate item e.g. Qt 5.3.2 for Windows 32-bit (VS 2013, OpenGL, 559.2 MB). Note that the title means that the QT package is 32 bit, not that it's only for 32 bit Windows.

For Win32.mak see this question:

(26 Nov '14, 09:41) grahamb ♦

I also see an issue with your setup, you have set WIRESHARK_BASE_DIR=C:\DataRoot\Projects\Wireshark and then are running C:\DataRoot\Projects\Wireshark>nmake -f makefile.nmake verify_tools.

WIRESHARK_BASE_DIR should be set one level higher than your source directory, e.g C:\DataRoot\Projects in your case. The 3rd party libs will be installed in WIRESHARK_BASE_DIR\wireshark-win32-libs (or WIRESHARK_BASE_DIR\wireshark-win64-libs)

(26 Nov '14, 09:46) grahamb ♦

Thank you, I have the x64 build working. I needed to make a couple of other changes to my batch file in addition to the one you suggested. Here is my current file, run after opening the VS 2013 x64 native compiler command window:

set CYGWIN=nodosfilewarning set CYGWIN_BASE=C:\cygwin64\bin set WIRESHARK_BASE_DIR=C:\DataRoot\Projects set WIRESHARK_TARGET_PLATFORM=win64 set QT5_BASE_DIR=C:\Qt\5.3\msvc2013_64 set INCLUDE=%INCLUDE%;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include

The last line added after reading the link you posted.

Since I would like to build the x86 as well what is the recommended way of doing this on a single development machine? Many thanks for your help and patience, Sid

(26 Nov '14, 11:08) sid Price

At the moment for nmake I recommend two repositories. I think you can switch one repo between x86 and x64 builds only if you nmake -f makefile.nmake clean and then delete ui\qt\config.pri. To be honest though do you actually need an x64 version?

Hopefully we'll soon finish off the CMake build system for Windows that builds out-of-source so that one source repo can support many builds.

(26 Nov '14, 11:30) grahamb ♦

Thanks to your efforts and help I now have two repositories on my dev machine and I am able to build both x86 and x64 Wiresharks. So very much appreciated.

Now my next challenge is learning about writing and debugging a protocol dissector. If you have any suggestions for a getting started tutorial for dissector writing I would love to see them.


(26 Nov '14, 13:33) sid Price

As it happens you're in luck. See my SharkFest'13 presentation on writing a dissector using 3 options, WSGD, Lua and C.

If using C, you absolutely must read doc\README.Dissector.

(26 Nov '14, 23:39) grahamb ♦

Great, I will start by playing with your sample.

(27 Nov '14, 10:21) sid Price
showing 5 of 10 show 5 more comments


As seen on stackoverflow, this seems to happen because you are trying to link a MSVC2013 compiled Qt with MSVC2010. As Qt project does not provide any 64bits version binaries for MSVC2010, I fear you have to switch to MSVC2013.

answered 25 Nov '14, 08:32

Pascal%20Quantin's gravatar image

Pascal Quantin
accept rate: 30%

This is confusing because I am using the Wireshark procedure for building. I have VS 2013 on my dev machine, how do I change the Wireshark build to use 2013? Sid.

(25 Nov '14, 08:58) sid Price

By ensuring that you run the batch file created during MSVC2013 installation and that you can find in Start menu which will set the relevant environment variables (Start -> Programs -> Visual Studio 2013 -> Visual Studio Tools). In your log you can see that the linker and compiler used are the ones from MSVC2010, not 2013. This is not related to Wireshark itself.

(25 Nov '14, 11:34) Pascal Quantin

Well that does not work, there are errors about VS versions. Since I followed the instructions for building Wireshark using VS 2010 there must be other changes required to build with VS 2013. I feel like I now have a mixture of scripts and configurations for VS 2010 and VS 2013.

I ask why the detailed instructions given do not work, what's the point in having them if they are wrong/incomplete. Sid.

(25 Nov '14, 12:44) sid Price

I question the original statement about QT, the path to the QT binary folder is:


Note "msvc2010". Sid.

(25 Nov '14, 12:46) sid Price

In your original report, the path is C:\Qt\5.3\msvc2013_64 and not C:\Qt\5.3\msvc2010_opengl, so you were already mixing things (you were building for x64 and not x86). There are no other requirements for building with MSVC2013 other than (of course) cleaning all your objects before rebuilding. But if you do not tell what errors you get, it's hard to support you... Also please pay more intention to the instructions provided in the developer guide. More specifically the sentence "Consult your compiler’s documentation to learn which version applies to your installation." does matter... If you think some things are missing in the documentation (typically what is related to Qt is missing I think as it's a work in progress) contributions are welcome.

(25 Nov '14, 13:35) Pascal Quantin

By the way, you did not tell us which Wireshark version you are trying to build. If this is the 1.12 branch, I would not even bother building the Qt GUI as it misses many features. All work for the migration to Qt framework is done in master branch and it is still optional. If you want to skip it (due to environment issues) you can unset QT5_BASE_DIR environment variable (or edit config.nmake) so as to skip it. Up to now, this is not yet a blocker for building Wireshark (you will still have the GTK based GUI).

(25 Nov '14, 13:44) Pascal Quantin

First, I do appreciate you taking the time to try to help. However, if I am directed to use the step-by-step guide then that is what I do! The guide is basically written for VS 2010 so that is what I am trying to use. The appearance of paths including VS2013 is not by any action I am knowingly taking. So, I have stepped back and started examining some of the outputs. For example, when I make "verify_tools" no errors are reported, however I do see that QT is not following my environment variable. The variable is set to "C:\Qt\5.3\msvc2010_opengl\bin". The output from "verify tools" shows "c:\Qt\5.3\msvc2013_64\bin". Where is this coming from please? The only environment variable I see is mine for "msvc2010_opengl". Note I am trying to build the x64 Wireshark. Sid.

(25 Nov '14, 15:07) sid Price

I think the issue is that using the step-by-step guide and trying to build an x64 version with VS 2010 just doesn't work. I tried removing the Qt5 environment variable and the build tool verifier still found the QT VS 2013 path, even though there was no entry in the environment.

So, I switched to building the x86 version (without QT) and it succeeded and produced a file named "wireshark-gtk.exe" plus several other EXE files. When I tried to run that file it complained about not having "wiretap-1.99.0.dll". Where is this file? Sid.

(25 Nov '14, 16:27) sid Price

Resolved the wiretap DLL issue, I was executing the wrong EXE.

So now my only issue remaining is how to build x64 Wireshark using VS 2010? Sid

(25 Nov '14, 17:25) sid Price

As I said earlier, the easiest is to build without Qt support as (as far as I know) Qt project is not providing x64 binaries for MSVC2010. Note that the current development guide is primarily focused on building the stable (master-1.12) branch and that the official builds for development (master) branch is using MSVC2013.

(25 Nov '14, 22:58) Pascal Quantin
showing 5 of 10 show 5 more comments