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

Wireshark-dev: [Wireshark-dev] Problem compiling Wireshark 1.6.1

From: Andreas <AndreasSander1@xxxxxxx>
Date: Mon, 22 Aug 2011 22:24:38 +0200
Hello,

I try to build Wireshark from source. Since you obviously built this program it must work, but theres one tool (mt.exe) that never works for me. I hope you can tell me what I'm doing wrong.

1. installed CYGWIN and Python 2.7
2. installed Microsoft Visual Studio V9.0 (aka VS2008)
3. called "vcvarsall.bat x86"
4. cd to wireshark-1.6.1
5. nmake -f Makefile.nmake setup
6. nmake -f Makefile.nmake distclean
7. nmake -f Makefile.nmake config.h tools image codecs wsutil epan

While building epan, nmake builds zlib1.dll in zlib.tmp when running the line $(MAKE) /$(MAKEFLAGS) -f win32/Makefile.msc zlib1.dll LOC="-DASMV -DASMINF" OBJA="inffas32.obj match686.obj"

This actually calls:

xcopy C:\wireshark-win32-libs-1.6\zlib125 zlib.tmp /D /I /E /Y
cd zlib.tmp
nmake.exe / -f win32/Makefile.msc zlib1.dll LOC="-DASMV -DASMINF"
    OBJA="inffas32.obj match686.obj"
if not exist C:\wireshark-win32-libs-1.6\zlib125 mkdir
    C:\wireshark-win32-libs-1.6\zlib125
if not exist C:\wireshark-win32-libs-1.6\zlib125\lib mkdir
    C:\wireshark-win32-libs-1.6\zlib125\lib
if not exist C:\wireshark-win32-libs-1.6\zlib125\include mkdir
    C:\wireshark-win32-libs-1.6\zlib125\include
mt.exe -nologo -manifest "zlib1.dll.manifest"
    -outputresource:zlib1.dll;2

The last command always crashes. The tool mt.exe loads zlib1.dll to memory and doesn't find the correct run-time library.

A) What's wrong with my approach?
B) Isn't the make run for $(ZLIB_DLL): nonsense? It copies files from C:\wireshark-win32-libs-1.6\zlib125 and after that it creates the same directory? C) What MSVCR90.dll run-time library should be compatible with zlib1.dll? I assume that there is a problem, that mt.exe finds. When I run this command from the command prompt, I get the message:
 Unabale to find a version of the runtime to run this application.

--
Andy