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

Wireshark Build for windows 7 64-bit

0

I want to know what changes are required to build wireshark on windows 7 64-bit. Is there any step by step guide other than the one given in the developer's guide as it is for 32 bit system? Which visual C++ would be required, 2008 or 2010? A step by step guide would be much preferable. Thanks

asked 21 Dec '11, 00:26

vish's gravatar image

vish
0557
accept rate: 0%

edited 21 Dec '11, 05:58

multipleinterfaces's gravatar image

multipleinte...
1.3k152340


3 Answers:

1

Although I haven't built a 64 bit version, as long as you have the 64 bit compilers installed everything should be straightforward. Ensure your command prompt is set up for building 64 bit applications and edit config.nmake to adjust the variable WIRESHARK_TARGET_PLATFORM to be "win64".

The buildbot and Wireshark releases use 2008.

answered 21 Dec '11, 00:53

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

Thanks for the reply. do I need to have 64-bit compiler for that or 32-bit compiler would do?

(21 Dec '11, 02:03) vish

I've converted your "answer" to a comment as that is the way this site works.

Yes, you must have the 64 bit compilers installed to produce a 64 bit version of wireshark.

(21 Dec '11, 02:37) grahamb ♦

Can you give me some link to download visual c++ 64bit compiler as I m not able to find it. Thanks

(21 Dec '11, 02:48) vish

64 bit isn't available in the free Express editions, only the paid for editions (for 2010 at least).

See here for edition information.

(21 Dec '11, 02:58) grahamb ♦

Thanks. One more thing, what do u mean by "setting up the command prompt for 64bit"? Does that mean I have to run vcvarsall.bat instead of vcvars_32.bat(in 32bit system)?

(22 Dec '11, 00:18) vish

I think you need vcvars64.bat out of the VC\bin\amd64 directory.

I've been poking around and it seems that you can install the 64 bit compilers on a 32 bit OS and "cross compile". In that case you need vcvars86_amd64.bat from the VC\bin\x86_amd64 directory. I haven't tried this though.

You can also use vcvarsall.bat and pass the appropriate option to set the toolchain to use as explained by the script usage help.

(22 Dec '11, 03:52) grahamb ♦

This is correct. I have built both 32- and 64-bit versions of Wireshark this way. The process is pretty much the same for either one; just declare your WIRESHARK_TARGET_PLATFORM target as win32 or win64, and set up the toolchain as appropriate for your platform.

(22 Dec '11, 06:55) multipleinte...
showing 5 of 7 show 2 more comments

0

You might want to read some of the answers to the question entitled, Build was working on WindowsXP, but now it fails to build in Win7 x64.

answered 22 Dec '11, 13:17

cmaynard's gravatar image

cmaynard ♦♦
9.4k1038142
accept rate: 20%

I m getting this error:

file_util.obj: module machine type(x86) conflicting with target machine type(x64).

What might be the problem?

(22 Dec '11, 23:56) vish

Did you previously compile for 32 bit with the same source tree? It sounds as though there is a 32 bit object file left behind and that can't be linked with the newly compiled 64 bit stuff.

Try nmake -f Makefile.nmake distclean to clean up your source tree.

(23 Dec '11, 00:52) grahamb ♦

Yes I have made a 32-bit version before but have also run "distclean" command.

(23 Dec '11, 01:36) vish

Now I have made the build for 64 bit but I m getting application error when I run the .exe file.

"The application was unable to start correctly"

(23 Dec '11, 03:53) vish

The error code is 0xc000007b.

(23 Dec '11, 05:14) vish

@vish: You should edit your question to include this valuable information. Also consider showing us the output of nmake -f Makefile.nmake verify_tools and the exact command you used to build Wireshark.

(23 Dec '11, 06:58) multipleinte...

I did the following steps:

  1. C:/Microsoft Visual Studio 10.0/VC/bin/amd64/vcvars_64.bat
  2. I ran
    nmake -f Makefile.nmake verify_tools The output was as shown in the developer's guide. All the tools are properly installed.
  3. Download vcredist_x64.exe and saved it to C:wireshark-win64-libs Then nmake -f Makefile.nmake setup
  4. nmake -f Makefile.nmake distclean
  5. nmake -f Makefile.nmake all

The wireshark.exe was made in the folder wireshark-gtk2, but on double clicking it, error is thrown: The application was unable to start correctly 0xc000007b.

I searched on google and got to know that the dll's should be 64-bit and that's causing the problem. But still dont know the exact cause and the solution.

(23 Dec '11, 08:39) vish

Did you read the Win64 Development wiki page carefully? In particular, did you set WIRESHARK_TARGET_PLATFORM=win64?

(23 Dec '11, 09:14) cmaynard ♦♦

Yes I did that change. But I m confused as to which batch file should I run? When I run vcvarsall.bat, then it shows that setting up environment for 32-bit. Is this correct? Then it throws an error, saying module type x86 conflicting with x64.

(23 Dec '11, 23:14) vish

See my comment to your original question, if you use vcvarsall.bat you must pass the amd64 option to set the environment for 64 bit compilation.

If you have previously used your source tree to build the 32 bit version, you must ensure that all build artefacts from that version are removed, e.g. by making distclean.

(24 Dec '11, 02:59) grahamb ♦
showing 5 of 10 show 5 more comments

0
Install Microsoft Visual Studio 2010 Express Edition.
Check for and install any updates.
Download vcredist_x64.exe and save it to C:\wireshark-win64-libs\.
Download and install Microsoft SDK.
Download and install cygwin.
Download and install Python (2.7.2).
Download and extract the Wireshark sources.
If you plan to create a Wireshark installer, download and install NSIS (2.4.6).

Edit Wireshark's config.nmake file, setting: MSVC_VARIANT=MSVC2010 (Yes, I know intuitively it should be set to MSVC2010EE, but I found that setting it to MSVC2010EE didn't work. I don't know why.) MAKENSIS="$(PROGRAM_FILES) (x86)\NSIS\makensis.exe" WIRESHARK_TARGET_PLATFORM=win64 (Alternatively, you can set this as an environment variable.)

call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86_amd64 (assume you install this directory)

nmake -f Makefile.nmake setup
nmake -f Makefile.nmake distclean
nmake -f Makefile.nmake all
nmake -f Makefile.nmake packaging
etc.</code></pre></div><div class="answer-controls post-controls"></div><div class="post-update-info-container"><div class="post-update-info post-update-info-user"><p>answered <strong>16 Jul '12, 05:46</strong></p><img src="https://secure.gravatar.com/avatar/8b5d11af8b0996d43bd3907ed22b6563?s=32&amp;d=identicon&amp;r=g" class="gravatar" width="32" height="32" alt="ltgao&#39;s gravatar image" /><p><span>ltgao</span><br />

1112
accept rate: 0%

I also found this bit helpful. I went around in a few circles to find my 64-bit compilers with the SDK, and there was a fix:

http://support.microsoft.com/kb/2519277

I also just launch the command prompts from the Start Menu (either under the MS Visual Studio 2010 Express group or the Microsoft Windows SDK 7.1 group)

(16 Jul ‘12, 07:50) rickg421