Ethereal-dev: RE: [Ethereal-dev] Patches to make Ethereal 0.9.15 compile with MVC

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Schipper, Martijn" <martijn.schipper@xxxxxxxxxxxx>
Date: Thu, 11 Sep 2003 09:28:33 -0400
Hello Graham,

You wrote:
 
> Which version of VC ??

I am using VC6.

> 
> The changes to Makefile.nmake and the change to config.nmake regarding
the
> /NODEFAULTLIB:libc.lib change use the C run-time library msvcrt
instead of
> libc.  According to the platform SDK libc is the statically linked
single
> thread version, and msvcrt is the multi-thread dll based version.  Is
> there
> a good reason for these changes ?  I compile using VC 6 with the
Platform
> SDK installed and these aren't needed.  Have you run vcvars32.bat to
set
> up
> the compilation environment ?

You are right: after running VCVARS32.BAT again it links without the
library modifications. But I asked the VC installer to update my
environment during installation, so that I don't have to run this batch
file each time. I also asked the installer of the platform SDK to do
that and to integrate with my VC installation. If I link with this
installation without the modifications I get these errors:
Linking ethereal.exe
        link @C:\DOCUME~1\mschippe\LOCALS~1\Temp\nma00436.
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __isctype already defined in
LIBC.lib(is
ctype.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strncmp already defined in
LIBC.lib(str
ncmp.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strchr already defined in
LIBC.lib(strc
hr.obj)

[ SNIP ]

LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other
libs; us
e /NODEFAULTLIB:library
ethereal.exe : fatal error LNK1169: one or more multiply defined symbols
found
NMAKE : fatal error U1077: 'link' : return code '0x491'
Stop.

Did you also integrate the SDK with your VC installation?

> 
> The changes to config.nmake to build the documentation seem to be
required
> (I'd never done that before) as a windows command shell doesn't
recognise
> the cygwin pod2html and pod2man scripts as executables as they don't
have
> an
> extension.
> 
> I would expect the files to require U*ix line endings as they are for
use
> by
> U*ix tools.

Can we distribute these files in this format? Or does Winzip do the
conversion for you so that they are always in DOS format?

> 
> The other changes to config.nmake seem to be personal environment
changes
> including the use of the cygwin version of python instead of a native
> version which would IMHO be slower, although arguably the reference to
the
> old b-20 version of cygwin should be updated to something newer
> (C:\cygwin\bin ??).

What version of python would be slower? You already have to install a
lot of Cygwin tools to get this compiled so I thought lets stick with
Cygwin tools :-)

C:\cygwin\bin is the default cygwin bin path.

> I don't know if the change to nsis/Makefile.nmake is required as I
don't
> have nsis installed, but it looks sensible.

Because the default COMMON_FILES_GNU contains a space (e.g. \Program
Files\) you are passing more arguments without the quotes.
 
Best regards,

Martijn Schipper
Software Quality Engineer 
GlobespanVirata BV 
Rembrandtlaan 1a 
3723 BG  Bilthoven 
The Netherlands 
Tel:    +31 (0)30 2296076
Fax:    +31 (0)30 2296061 
E-mail:   Martijn.Schipper@xxxxxxxxxxxxxxxxxxx 
Internet:  www.virata.com