When building Wireshark under Windows 7, I receive the error above after changing to the wsutil directory. I'm not familiar with biulding DLLs, but I would have thought the DllMainCRTStartup function should have been found in one of the *.c files within wsutil - but it isn't. Here's the output I get from running the "nmake -f Makefile.nmake all" command: <previous packages="" built="" correctly...=""> cd wsutil "C:Program Files (x86)Microsoft Visual Studio 8VCBINnmake.exe" / -f Makefile.nmake Microsoft (R) Program Maintenance Utility Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved.
ibwsutil.def /OUT:libwsutil.dll /IMPLIB:libwsutil.lib ..imagelibwsutil.res file_util.obj inet_aton.obj inet_ntop.obj inet_pton.obj mpe g-audio.obj privileges.obj str_util.obj type_util.obj strptime.obj unicode-utils.obj wsgetopt.obj C:wireshark-win32-libsgtk2libglib-2.0.lib C:wireshark-win32-libsgtk2libgmodule-2.0.lib C:wireshark-win32-libsgtk2libgobject-2.0.lib Creating library libwsutil.lib and object libwsutil.exp LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup libwsutil.dll : fatal error LNK1120: 1 unresolved externals NMAKE : fatal error U1077: '"C:Program Files (x86)Microsoft Visual Studio 8VCBINlink.EXE"' : return code '0x460' Stop. NMAKE : fatal error U1077: '"C:Program Files (x86)Microsoft Visual Studio 8VCBINnmake.exe"' : return code '0x2' Stop. asked 02 Dec '10, 07:50 Saul |
One Answer:
I don't specifically know what the problem is.... I have no troubles when building with Visual Studio 2008 (VC9). I notice you appear to be building with Visual Studio 2005 (VC8). Have you commented / uncommented the proper lines in config.nmake to indicate the compiler you are using ? (config.make as distributed indicates that Visual Studio 2008 (VC9) is being used). Is there any particular reason you are using VC8 ? Wireshark is built using VC9 these days. answered 02 Dec '10, 08:50 Bill Meier ♦♦ edited 02 Dec '10, 09:19 |
Yes, I modified the config.nmake file to account for the correct version of VS. The reason I'm using VC8 is because that is the version I own - and I can't afford to upgrade at the moment.
I did note that even though my user account has administrator privileges under Windows 7, there are times that subdirectory creation fails. I will be backing out the various tools (for example, TortoiseSVN never worked properly) and will be re-installing everything specifically as administrator.
Just as an FYI:
A free version of VS2008 (VS2008EE) can be downloaded from Microsoft.
See: http://www.wireshark.org/docs/wsdg_html_chunked /ChSetupWin32.html#ChSetupMSVC
Yep - tried that. Downloaded the VS2008 and installed it. Did a "distclean" - made sure I ran the correct batch file to set up the path, yada yada - and still bombed out at the same point with the same error. I ran all this as the "adminstrator" under Windows 7.
BTW: I did remember to change config.nmake back to the correct VS2008) version before doing the nmake ... all.