Wireshark-dev: Re: [Wireshark-dev] Microsoft Visual C Version 6support isa bitoutdated ...

From: Andrew Hood <ajhood@xxxxxxxxx>
Date: Wed, 10 Jan 2007 00:08:33 +1100
Ulf Lamping wrote:

> P.S.: In the meantime, I can successfully compile and run Wireshark 
> versions generated on every MSVC variant mentioned - so there's actually 
> some real progress in this topic ;-)))

This is about as clear as I can make it.

I have MSVC 8.0 build 50727. I detest trying to use the M$ compiler
suite, but sometimes the alternatives are worse.

>From my standard command prompt (cmd.exe) I drop everything from the
PATH except the basic M$ directories, python24 and cygwin and run
vsvars32.bat

I did:

nmake Makefile.nmake clean

moved my modified config.nmake and Makefile.nmake out of the build tree
(these are the only files I have modified)

svn update

I enable HHC_DIR and disable AIRPCAP_DIR in config.nmake

nmake -f Makefile.nmake setup

nmake -f Makefile.nmake

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

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

Then rerun nmake:

Linking wireshark.exe
	link @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nm7D.tmp
libui.lib(font_utils.obj) : error LNK2019: unresolved external symbol
__imp__GetTextMetricsW@8 referenced in function _get_windows_font_gtk1
libui.lib(font_utils.obj) : error LNK2019: unresolved external symbol
__imp__GetTextFaceW@12 referenced in function _get_windows_font_gtk1
libui.lib(font_utils.obj) : error LNK2019: unresolved external symbol
__imp__DeleteDC@4 referenced in function _get_windows_font_gtk1
libui.lib(print_mswin.obj) : error LNK2001: unresolved external symbol
__imp__DeleteDC@4
libui.lib(font_utils.obj) : error LNK2019: unresolved external symbol
__imp__SelectObject@8 referenced in function _get_windows_font_gtk1
libui.lib(font_utils.obj) : error LNK2019: unresolved external symbol
__imp__GetStockObject@4 referenced in function _get_windows_font_gtk1
libui.lib(font_utils.obj) : error LNK2019: unresolved external symbol
__imp__CreateDCW@16 referenced in function _get_windows_font_gtk1
libui.lib(print_mswin.obj) : error LNK2019: unresolved external symbol
__imp__EndDoc@4 referenced in function _print_mswin
libui.lib(print_mswin.obj) : error LNK2019: unresolved external symbol
__imp__EndPage@4 referenced in function _print_mswin
libui.lib(print_mswin.obj) : error LNK2019: unresolved external symbol
__imp__StartPage@4 referenced in function _print_mswin
libui.lib(print_mswin.obj) : error LNK2019: unresolved external symbol
__imp__StartDocA@8 referenced in function _print_mswin
libui.lib(print_mswin.obj) : error LNK2019: unresolved external symbol
__imp__SetAbortProc@8 referenced in function _print_mswin
libui.lib(print_mswin.obj) : error LNK2019: unresolved external symbol
__imp__PrintDlgA@4 referenced in function _get_printer_dc
libui.lib(print_mswin.obj) : error LNK2019: unresolved external symbol
__imp__TextOutA@20 referenced in function _print_file
libui.lib(print_mswin.obj) : error LNK2019: unresolved external symbol
__imp__SetMapMode@8 referenced in function _print_file
libui.lib(print_mswin.obj) : error LNK2019: unresolved external symbol
__imp__GetTextMetricsA@8 referenced in function _print_file
htmlhelp.lib(init.obj) : error LNK2019: unresolved external symbol
__imp__RegCloseKey@4 referenced in function "int __stdcall
GetRegisteredLocation(char *)" (?GetRegisteredLocation@@YGHPAD@Z)
htmlhelp.lib(init.obj) : error LNK2019: unresolved external symbol
__imp__RegQueryValueExA@24 referenced in function "int __stdcall
GetRegisteredLocation(char *)" (?GetRegisteredLocation@@YGHPAD@Z)
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.

Those are fixed by adding gdi32.lib advapi32.lib comdlg32.lib to
wireshark_LIBS.

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