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

Unable to build wireshark from the source on windows XP

2

Hi,

I have successfully compiled wireshark source code on ubunut but while trying to compile wireshark source code on windows XP I am getting stuck with few errors: It would be nice if anyone can let me know where I am going wrong.

nmake -f Makefile.nmake verify_tools output is same as the one given in win32 installation guide. nmake -f Makefile.nmake setup command did not give any error and the final line said "Wireshark is ready to build".

But when I run the command nmake -f Makefile.nmake all, I get the below error:

file_util.c
file_util.c(246) : error C2220: warning treated as error - no object file generated
file_util.c(246) : warning C4133: 'function' : incompatible types - from '_stat64 *' to '_stati64 *'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio .NET\VC7\BIN\nmake.exe"' : return code '0x2'
Stop.

If I run the command as nmake /I -f Makefile.nmake all then I get the below error:

LINK : fatal error LNK1181: cannot open input file 'main.obj'
        cd ..
        cd win32
        nmake /I                  /f Makefile.nmake libui_win32.lib

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

'libui_win32.lib' is up-to-date cd .. NMAKE : fatal error U1073: don't know how to make 'wsutil\libwsutil.lib' Stop.

Can anyone suggest what needs to be checked to resolve this? I am using Microsoft Visual Studio .Net (2002).

Thanks Anoop

asked 05 Jul ‘11, 13:12

Anoop's gravatar image

Anoop
31113
accept rate: 0%

edited 06 Jul ‘11, 00:48

SYN-bit's gravatar image

SYN-bit ♦♦
17.1k957245

1

I suggest you try building with a newer VC (say VC 2008) ? VC2002 is a bit old;

Wireshark is currently built with VC2008.

The VC 2008 “Express Edition” can be downloaded for free from Microsoft.

See http://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html

(05 Jul ‘11, 14:19) Bill Meier ♦♦
2

Bill’s answer is your best bet going forward, but if you MUST use VS 2002, then the issue is probably with the SDK. Are you using the SDK that comes with VS? If so then I would suggest you install a more modern SDK and use a command window initialised using the SDK SetEnv.cmd to set up the paths to the tools. In SetEnv.cmd you can see the required parameters if the defaults don’t suit you.

(05 Jul ‘11, 14:28) grahamb ♦

Hey Graham, I did get a newer SDK but the build still failed. Like Bill suggested I might as well get a more recent release of VC and try out.

(05 Jul ‘11, 20:26) Anoop

Was able to build it successfully with a newer version. Thanks.

(08 Jul ‘11, 08:24) Anoop