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

I tried to build wireshark under WinXP + MC VS 2008 by "2.2. Win32: Step-by-Step Guide", but I'm having trouble with nmake -f Makefile.nmake verify_tools. I got:

E:\work\wireshark\trunk-1.6>nmake -f Makefile.nmake all

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

Makefile.nmake(10) : fatal error U1052: file 'win32.mak' not found

I Google'd it and found this, but it didn't help. I tried putting the win32.mak file in C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include, but nmake cannot see it...

Please help

This question is marked "community wiki".

asked 24 Jun '11, 05:05

boomsic's gravatar image

accept rate: 0%

edited 24 Jun '11, 18:41

helloworld's gravatar image


I make next solution

edit Makefile.nmake

and define full path to win32.mak

(24 Jun '11, 09:49) boomsic

I run this one:

C:Program FilesMicrosoft Visual Studio 9.0VCbinvcvars32.bat

you mean that?

I agree that where is something wrong in my build environment, but I cant find a mistake.

(26 Jun '11, 05:50) boomsic

You shouldn't have to edit Makefile.nmake. If nmake can't find win32.mak then that's a strong indication that your build environment isn't set up correctly. Did you run vcvarsall.bat before running nmake?

Update 2014-07-24 It looks like Windows SDKs 8.0 and 8.1 don't include win32.mak. I worked around the issue by calling

set INCLUDE=%INCLUDE%;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include


set INCLUDE=%INCLUDE%;c:\Program Files\Microsoft SDKs\Windows\v7.1A\Include

as appropriate after running vcvarsall.bat

permanent link

answered 24 Jun '11, 09:58

Gerald%20Combs's gravatar image

Gerald Combs ♦♦
accept rate: 24%

edited 24 Jul '14, 15:50

You should install Windows sdk (

Then you will found Wind32.mak file in C:\Program Files\Microsoft SDKs\Windows\v7.0\Include.

permanent link

answered 21 Aug '11, 07:41

one%20step's gravatar image

one step
accept rate: 0%

edited 21 Aug '11, 10:40

Guy%20Harris's gravatar image

Guy Harris ♦♦

Right. Copying it from there to C:\Program Files\Microsoft Visual Studio 12.0\VC\include solved the issue for me.

(30 Nov '13, 06:21) gtirloni

You probably need an include statement, here's the generic script I use (VS 2012 with the 7.1a sdk)

@echo off
echo Commands are:
echo nmake -f Makefile.nmake verify_tools
echo nmake -f Makefile.nmake setup
echo nmake -f Makefile.nmake all
echo nmake -f Makefile.nmake packaging
echo nmake -f Makefile.nmake packaging_papps
echo nmake -f Makefile.nmake clean

set INCLUDE=%INCLUDE%;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include;
set PATH=%PATH%;c:\cygwin\bin
echo Adding things to the path...
if "%1" == "" goto x86
if /i %1 == x86       goto x86
if /i %1 == x64      goto x64
goto usage

echo Error in script usage. The correct usage is:
echo     %0 [option]
echo where [option] is: x86 ^| x64 
echo For example:
echo     %0 x86
goto :eof

call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x64
title Command Prompt (VC++ 2012 x64)
goto :eof

call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
title Command Prompt (VC++ 2012 -x86)
goto :eof
permanent link

answered 16 Mar '14, 17:30

Scott%20Harman's gravatar image

Scott Harman
accept rate: 50%


While this may work for you, it might cause issues for others, observations\notes:

  1. Unless you need it in your batch file, there is no need to add Cygwin to the path, config.nmake does that for you.
  2. The Win 7.1 SDK doesn't get installed with VS2012, it's a separate download.
  3. The vcvarsall batch files are additive, so if you run the script again (from the same shell), particularly if you change from x86 to x64 (or vice-versa) your environment will grow duplicate entries each time and may not do what you think when changing the "bitedness".
  4. There are some new Wireshark environment variables in the dev versions that you might want to set:

    WIRESHARK_BASE_DIR - sets the base directory for your 3rd party libraries, this directory can contain both x86 and x64 libraries. Only used if WIRESHARK_LIB_DIR isn't defined.

    WIRESHARK_VERSION_EXTRA - the suffix string for your version of Wireshark.

  5. For VS2012 and later, the vcvarsall batchfile sets an env var for the VS version (VisualStudioVersion) in use so you don't need to modify config.nmake to manually set that, it picks it up from the env.

  6. For VS2012 and later, the vcvarsall batchfile sets an env var if building for x64 (Platform=X64) in use so you don't need to modify config.nmake to manually set that, it picks it up from the env.
(17 Mar '14, 03:41) grahamb ♦

Thanks Graham I will try to make it a bit more generic - that's really helpful!

(19 Mar '14, 20:27) Scott Harman

If you have already installed VisualStudio and service pack, then try to install SDK it may fail. You may need to unselect both C++ compiler and redistributable package from the install component for the install to work.

permanent link

answered 16 Apr '14, 11:53

YXI's gravatar image

accept rate: 0%

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: 24 Jun '11, 05:05

question was seen: 30,048 times

last updated: 24 Jul '14, 15:50

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