Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] problem building wireshark

From: "Bill Meier" <wmeier@xxxxxxxxxxx>
Date: Tue, 12 Jun 2007 13:30:15 -0400
> uninstalled and reinstalled everything.  All of the steps worked without any problems (except for the last step).
> now when I run the command nmake -f Makefile.nmake all, I get several deprecated function warnings and the following error:
> 
> lemon.c(3958) : warning C4996: 'sprintf' was declared deprecated
>         C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\stdio.h(345) : see
>  declaration of 'sprintf'
>         Message: 'This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
> lemon.c(4182) : warning C4996: 'strcpy' was declared deprecated
>         C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\string.h(73) : see declaration of 'strcpy'
>         Message: 'This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
> NMAKE : fatal error U1077: 'cl' : return code '0x2'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\nmake.exe"' : return code '0x2'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\nmake.exe"' : return code '0x2'
> Stop.
> 

Several comments:

1. Please review the following (if you've not already done so): 
http://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html#ChSetupMSVC

Note that since you appear to be using VC8, you will need to change 
config.nmake file to indicate that you're using vc8 (if you've not already 
done so).

2. The current Wireshark distribution is compiled using VC6 and thus does
not give the warnings about sprintf & etc.

The Wireshark WIndows make files specify "stop on warning" to ensure that all 
warnings are fixed. That's why the 'fatal error' exit.

If the config.nmake specifies the correct value for MSC_VARIANT it's possible 
the compile will then complete with no problem.


Please let us know if this helps or if you encounter further problems.


Bill Meier