Wireshark-dev: Re: [Wireshark-dev] Compiling for Windows XP
From: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
Date: Tue, 5 Mar 2013 10:34:23 +0000
On 4 March 2013 17:56, Max Baker <max@xxxxxxxxxx> wrote:
Hi All,

I was able to compile 32-bit and 64-bit versions of Wireshark
(http://nikonhacker.com/viewtopic.php?f=2&t=708).

I installed and tested both on a 32-bit Windows 7 and 64-bit Windows 7
Machine.

However, one user is saying that the 32-bit build does not work for him
for Windows XP.   After install he is reporting the error
"c:\programs\wireshark\wireshark.exe isn't a valid windows program".

Does this ring any bells for anyone?  Is there any steps needed to cross
compile an XP-friendly version from Win7?


The target version of the executable isn't being set correctly. See http://msdn.microsoft.com/en-us/library/aa383745%28VS.85%29.aspx for some info.  This is usually set either by Visual Studio, or for nmake stuff by the parameters passed to Setenv.cmd

Basically if using the SDK you need to define APPVER to 5.01.

Also, one small nit with
https://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html :
I had to swap #1 and #2 or the process fails.

It's a strange error when this happens:
Installation of the "Microsoft Windows SDK for Windows 7" product has
reported the following error: Please refer to
Samples\Setup\HTML\ConfigDetails.htm document for further information. "

Similar to this  :
http://social.msdn.microsoft.com/Forums/en-US/windowssdk/thread/8f3350f9-0b47-40ae-b070-f2ccbf041875/

Swapping the order of #1 and #2 allowed me to compile both versions ok.


See http://ta.speot.is/2012/04/09/visual-studio-2010-sp1-windows-sdk-7-1-install-order/ for more info about how to manage the install of VS2010 and the SDK.