Wireshark-dev: Re: [Wireshark-dev] Microsoft Visual C Version 6support isa bitoutdated ...
Hi,
Sorry for not providing this simple patch before. It is OK with VS 2005 express edition, can you check it is OK with previous releases because I do not have them anymore?
Regarding relationships between VS express edition and PSDK, I successfully compiled Wireshark once I had only done the 3 first steps of the process adaptation. Therefore, I suppose the misconfig problem comes from another place...
Ulf, don't you think it is also a good idea to provide a project file so that debugging would be *a lot* easier because developpers could use all the IDE debugging tools (breakpoints, step by step debugging etc...). Such project file really helped me! I suppose a simple project file created with Visual 6 could be translated by any other MS IDE.
Regards
Laurent
2007/1/9, Ulf Lamping <ulf.lamping@xxxxxx>:
> 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?
> 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.
> 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 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".
>
> 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/
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.
Regards, ULFL
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.
_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000066
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev
Index: config.nmake
===================================================================
--- config.nmake (rvision 20357)
+++ config.nmake (copie de travail)
@@ -405,9 +405,9 @@
# /D_CRT_NONSTDC_NO_DEPRECATE don't warn for "Deprecated CRT Functions" as MSDN calls this
#
!IF "$(MSVC_VARIANT)" == "MSVC6" || "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "MSVC2003" || "$(MSVC_VARIANT)" == "DOTNET11FRAMEWORK" || "$(MSVC_VARIANT)" == "VC2003TOOLKIT"
-LOCAL_CFLAGS=/Zi /W3
+LOCAL_CFLAGS=/Zi /W3 /MD
!ELSEIF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "DOTNET20FRAMEWORK"
-LOCAL_CFLAGS=/Zi /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
+LOCAL_CFLAGS=/Zi /W3 /MD /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
!ELSE
!ERROR MSVC_VARIANT unknown
!ENDIF
@@ -421,18 +421,13 @@
!IF "$(MSVC_VARIANT)" == "MSVC6"
LOCAL_LDFLAGS=/DEBUG
!ELSEIF "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "MSVC2003" || "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "VC2003TOOLKIT" || "$(MSVC_VARIANT)" == "DOTNET11FRAMEWORK" || "$(MSVC_VARIANT)" == "DOTNET20FRAMEWORK"
-LOCAL_LDFLAGS=/DEBUG /DEFAULTLIB:msvcrt /NODEFAULTLIB:libc /NODEFAULTLIB:libcmt
+LOCAL_LDFLAGS=/DEBUG
!ELSE
!ERROR MSVC_VARIANT unknown
!ENDIF
-!IF "$(MSVC_VARIANT)" == "DOTNET11FRAMEWORK" || "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "MSVC2003"
-PLUGIN_LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386
-!ELSE
PLUGIN_LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!ENDIF
-
#
# Optional: Use the User's Guide as the online help system
# (currently experimental).