[Mapserver-users] Mapserver 3.7 linker error on Win32

Ed McNierney ed at topozone.com
Wed Feb 12 11:30:29 EST 2003


This is a multi-part message in MIME format.

------_=_NextPart_001_01C2D2B4.0E481549
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Matt -
=20
This simply means that not all of your libraries were built using the =
same runtime library options.  So you've got some module somewhere that =
is compiled to use the static LIBC library to find runtime functions, =
and another that is compiled to use the DLL version (MSVCRT).
=20
Have you tried following the compiler's instruction and using the =
/NODEFAULTLIBRARY switch?  This won't fix the warnings but it may avoid =
the error and let you link.
=20
    - Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242=20

-----Original Message-----
From: Matthew Hatcher [mailto:MJHatcher at space.qinetiq.com]
Sent: Wednesday, February 12, 2003 11:17 AM
To: 'mapserver-users at lists.gis.umn.edu'
Subject: [Mapserver-users] Mapserver 3.7 linker error on Win32



Hi all,=20

I'm having problems with compiling MS3.7 under Win32. As far as I can =
tell, I have all the libraries built correctly and they are not =
conflicting versions. I am using GD2.0.7gif in order to get 24-bit =
rendering, and have enabled WFS and WMS support using libcurl.

Everything compiles fine, but at the link stage I get errors about a =
conflict between LIBC.lib and MSVCRT.lib (see below). I've seen messages =
before about multi-threaded versions of freetype causing this problem, =
but I am definitely linking to the single-threaded version. Are there =
any other libraries that could be causing such a problem?

I'm welcome to suggestions! I would ask if anyone has a pre-built =
executable, but a 3.7 exe with WMS, WFS, 24-bit, GDAL, OGR AND ORACLE =
SPATIAL support is probably asking a bit much..... ;-)

Cheers in advance,=20

Matt.=20


Microsoft (R) Incremental Linker Version 6.00.8447=20
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.=20

MSVCRT.lib(MSVCRT.dll) : error LNK2005: _free already defined in =
LIBC.lib(free.o=20
bj)=20
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in =
LIBC.lib(mall=20
oc.obj)=20
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _time already defined in =
LIBC.lib(time.o=20
bj)=20
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _realloc already defined in =
LIBC.lib(rea=20
lloc.obj)=20

--=3D snip =3D--=20

MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _free already defined in =
LIBC.lib(free=20
.obj); second definition ignored=20
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _malloc already defined in =
LIBC.lib(ma=20
lloc.obj); second definition ignored=20
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _time already defined in =
LIBC.lib(time=20
.obj); second definition ignored=20
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _realloc already defined in =
LIBC.lib(r=20
ealloc.obj); second definition ignored=20

--=3D snip =3D--=20

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



**********************************************************************
The information contained in this email and any subsequent
correspondence is private and is intended solely for the=20
intended recipient(s). For those other than the intended
recipient(s) any disclosure, copying, distribution, or any=20
action taken or omitted to be taken in reliance on such=20
information is prohibited and may be unlawful.
**********************************************************************



------_=_NextPart_001_01C2D2B4.0E481549
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<TITLE>Mapserver 3.7 linker error on Win32</TITLE>

<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D335122816-12022003><FONT face=3DArial color=3D#0000ff =
size=3D2>Matt=20
-</FONT></SPAN></DIV>
<DIV><SPAN class=3D335122816-12022003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D335122816-12022003><FONT face=3DArial color=3D#0000ff =
size=3D2>This=20
simply means that not all of your libraries were built using the same =
runtime=20
library options.&nbsp; So you've got some module somewhere that is =
compiled to=20
use the static LIBC library to find runtime functions, and another that =
is=20
compiled to use the DLL version (MSVCRT).</FONT></SPAN></DIV>
<DIV><SPAN class=3D335122816-12022003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D335122816-12022003><FONT face=3DArial color=3D#0000ff =
size=3D2>Have=20
you tried following the compiler's instruction and using the =
/NODEFAULTLIBRARY=20
switch?&nbsp; This won't fix the warnings but it may avoid the error and =
let you=20
link.</FONT></SPAN></DIV>
<DIV><SPAN class=3D335122816-12022003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D335122816-12022003>&nbsp;&nbsp;&nbsp; <FONT =
face=3DArial=20
color=3D#0000ff size=3D2>- Ed</FONT></SPAN></DIV>
<DIV><SPAN class=3D335122816-12022003>
<P><FONT size=3D2>Ed McNierney<BR>President and Chief =
Mapmaker<BR>TopoZone.com /=20
Maps a la carte, Inc.<BR>73 Princeton Street, Suite 305<BR>North =
Chelmsford,=20
MA&nbsp; 01863<BR>ed at topozone.com<BR>(978) 251-4242 =
</FONT></P></SPAN></DIV>
<BLOCKQUOTE>
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> Matthew Hatcher=20
  [mailto:MJHatcher at space.qinetiq.com]<BR><B>Sent:</B> Wednesday, =
February 12,=20
  2003 11:17 AM<BR><B>To:</B>=20
  'mapserver-users at lists.gis.umn.edu'<BR><B>Subject:</B> =
[Mapserver-users]=20
  Mapserver 3.7 linker error on Win32<BR><BR></FONT></DIV>
  <P><FONT size=3D2>Hi all,</FONT> </P>
  <P><FONT size=3D2>I'm having problems with compiling MS3.7 under =
Win32. As far=20
  as I can tell, I have all the libraries built correctly and they are =
not=20
  conflicting versions. I am using GD2.0.7gif in order to get 24-bit =
rendering,=20
  and have enabled WFS and WMS support using libcurl.</FONT></P>
  <P><FONT size=3D2>Everything compiles fine, but at the link stage I =
get errors=20
  about a conflict between LIBC.lib and MSVCRT.lib (see below). I've =
seen=20
  messages before about multi-threaded versions of freetype causing this =

  problem, but I am definitely linking to the single-threaded version. =
Are there=20
  any other libraries that could be causing such a problem?</FONT></P>
  <P><FONT size=3D2>I'm welcome to suggestions! I would ask if anyone =
has a=20
  pre-built executable, but a 3.7 exe with WMS, WFS, 24-bit, GDAL, OGR =
AND=20
  ORACLE SPATIAL support is probably asking a bit much..... =
;-)</FONT></P>
  <P><FONT size=3D2>Cheers in advance,</FONT> </P>
  <P><FONT size=3D2>Matt.</FONT> </P><BR>
  <P><FONT size=3D2>Microsoft (R) Incremental Linker Version =
6.00.8447</FONT>=20
  <BR><FONT size=3D2>Copyright (C) Microsoft Corp 1992-1998. All rights=20
  reserved.</FONT> </P>
  <P><FONT size=3D2>MSVCRT.lib(MSVCRT.dll) : error LNK2005: _free =
already defined=20
  in LIBC.lib(free.o</FONT> <BR><FONT size=3D2>bj)</FONT> <BR><FONT=20
  size=3D2>MSVCRT.lib(MSVCRT.dll) : error LNK2005: _malloc already =
defined in=20
  LIBC.lib(mall</FONT> <BR><FONT size=3D2>oc.obj)</FONT> <BR><FONT=20
  size=3D2>MSVCRT.lib(MSVCRT.dll) : error LNK2005: _time already defined =
in=20
  LIBC.lib(time.o</FONT> <BR><FONT size=3D2>bj)</FONT> <BR><FONT=20
  size=3D2>MSVCRT.lib(MSVCRT.dll) : error LNK2005: _realloc already =
defined in=20
  LIBC.lib(rea</FONT> <BR><FONT size=3D2>lloc.obj)</FONT> </P>
  <P><FONT size=3D2>--=3D snip =3D--</FONT> </P>
  <P><FONT size=3D2>MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _free =
already=20
  defined in LIBC.lib(free</FONT> <BR><FONT size=3D2>.obj); second =
definition=20
  ignored</FONT> <BR><FONT size=3D2>MSVCRT.lib(MSVCRT.dll) : warning =
LNK4006:=20
  _malloc already defined in LIBC.lib(ma</FONT> <BR><FONT =
size=3D2>lloc.obj);=20
  second definition ignored</FONT> <BR><FONT =
size=3D2>MSVCRT.lib(MSVCRT.dll) :=20
  warning LNK4006: _time already defined in LIBC.lib(time</FONT> =
<BR><FONT=20
  size=3D2>.obj); second definition ignored</FONT> <BR><FONT=20
  size=3D2>MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _realloc already =
defined in=20
  LIBC.lib(r</FONT> <BR><FONT size=3D2>ealloc.obj); second definition=20
  ignored</FONT> </P>
  <P><FONT size=3D2>--=3D snip =3D--</FONT> </P>
  <P><FONT size=3D2>&nbsp;&nbsp; Creating library mapserv.lib and object =

  mapserv.exp</FONT> <BR><FONT size=3D2>LINK : warning LNK4098: =
defaultlib=20
  "MSVCRT" conflicts with use of other libs; us</FONT> <BR><FONT =
size=3D2>e=20
  /NODEFAULTLIB:library</FONT> <BR><FONT size=3D2>mapserv.exe : fatal =
error=20
  LNK1169: one or more multiply defined symbols found</FONT> <BR><FONT=20
  size=3D2>NMAKE : fatal error U1077: 'link' : return code =
'0x491'</FONT>=20
  <BR><FONT size=3D2>Stop.</FONT> </P><CODE><FONT=20
  =
size=3D3><BR><BR>********************************************************=
**************<BR>The=20
  information contained in this email and any =
subsequent<BR>correspondence is=20
  private and is intended solely for the <BR>intended recipient(s). For =
those=20
  other than the intended<BR>recipient(s) any disclosure, copying, =
distribution,=20
  or any <BR>action taken or omitted to be taken in reliance on such=20
  <BR>information is prohibited and may be=20
  =
unlawful.<BR>************************************************************=
**********<BR></BLOCKQUOTE></FONT></CODE></BODY></HTML>

------_=_NextPart_001_01C2D2B4.0E481549--



More information about the mapserver-users mailing list