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] Microsoft Visual C Version 6support isa bitoutdated ...

From: Andrew Hood <ajhood@xxxxxxxxx>
Date: Wed, 10 Jan 2007 08:29:15 +1100
Ulf Lamping wrote:
>>I have MSVC 8.0 build 50727. I detest trying to use the M$ compiler
>>suite, but sometimes the alternatives are worse.
> 
> 
> Do you use the Express Edition or the Studio?

"Add Remove Programs" lists it as "Microsoft Visual Studio 2005
Professional Edition - ENU"

>>nmake Makefile.nmake clean
> 
> 
> You might better use distclean
> 
> 
>>moved my modified config.nmake and Makefile.nmake out of the build tree
>>(these are the only files I have modified)
> 
> 
> Did you enabled the MSVC_VARIANT setting for Visual Studio 2005 in config.nmake line 73?
> If you didn't this would explain problems ;-) - but I guess you've done so already.

Yes, I did. :)

>>I enable HHC_DIR and disable AIRPCAP_DIR in config.nmake
>>
> 
> 
> You may better keep HHC_DIR disabled for now (it's optional) - let's fix one thing at a time ;-)

It's trivial to fix by changing HHC_LIBS as quoted lower down.

>>It didn't build zlib and create the include and lib directories and copy
>>the files into them early enough in the process for the sources that
>>reference zlib.h to compile, so I did the zlib build by hand, and reran
>>nmake
> 
> 
> With my latest changes (yesterday), the "setup" target should download zlib123.zip (instead of zlib123-dll.zip),
> and compile the zlib source when running e.g. the "all" target (right before wiretap is compiled).
> 
> There's no longer need to compile zlib "by hand".

Anders also observed it didn't build. If you did "nmake -k ..." it might
build later on, and then rerunning nmake might work.

>>Then it falls over because htmlhelp.lib is not in $(HHC_DIR)/lib. I said
>>before VS8 includes hhc.exe in $(HHC_DIR) but the includes, libs and
>>dlls are in the SDK, so I changed the HHC_LIBS in config.nmake
>>
>>!IF "$(MSVC_VARIANT)" == "MSVC2005"
>>HHC_LIBS=htmlhelp.lib
>>!ELSE
>>HHC_LIBS=$(HHC_DIR)\lib\htmlhelp.lib
>>!ENDIF
> 
> 
> I'll have a look at the HHC topic later.
> 
> 
>>htmlhelp.lib(init.obj) : error LNK2019: unresolved external symbol
>>__imp__RegOpenKeyExA@20 referenced in function "int __stdcall
>>GetRegisteredLocation(char *)" (?GetRegisteredLocation@@YGHPAD@Z)
>>wireshark.exe : fatal error LNK1120: 18 unresolved externals
>>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
>>8\VC\BIN\link.EXE"' : return code '0x460'
>>Stop.
>>
> 
> 
> There seems to be some platform libs missing.
> 
> 
>>Those are fixed by adding gdi32.lib advapi32.lib comdlg32.lib to
>>wireshark_LIBS.
>>
> 
> 
> If you're running the express edition, did you followed the guidelines to integrate the Paltform SDK into VC?
> Details are at (especially step 4): http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/

It's Studio. Not Express.

> I'm not sure if it's better to depend on our developers that they've done this or to add the libs to the linker flags. 
> Maybe the latter will make the whole process easier for our developers.

I'd just like to be able to build a clean source tree. I had less
trouble with MSVC2003 Professional.

> P.S: Laurent mentioned a change in the linker flags that might be helpful here as well, I'm currently waiting for a patch from him.

Me too. Windows is not my platform of choice.

-- 
There's no point in being grown up if you can't be childish sometimes.
                -- Dr. Who