[Mapserver-users] MapServer Windows external symbol problem
Pericles S. Nacionales
nacional at cbs.umn.edu
Mon Jun 21 13:19:17 PDT 2004
Howard,
Thanks much! libcmt is the one flag I haven't tried adding.
-Perry
On Mon, 2004-06-21 at 15:12, Howard Butler wrote:
> Pericles,
>
> Here is what I set my LDFLAGS in Makefile.vc after pointing to the PHP regex:
> LDFLAGS = /NODEFAULTLIB:msvcrt /NODEFAULTLIB:libcd
> /NODEFAULTLIB:libcmt /DEBUG
>
> I'm speculating that it is caused by some code being built as debug while
> other is "release" code. VC++ is kind of stupid when you try to mix the
> two together and says that those symbols have already been defined
>
> Howard
>
> At 03:08 PM 6/21/2004, Pericles S. Nacionales wrote:
> >Howard, Assefa,
> >
> >I got around this regex problem by compiling against the PHP regex
> >library.
> >
> >But then I ran into system library conflicts during linking. I tried
> >changing the /NODEFAULTLIB:<library> flag but it didn't help. Any help
> >with this would be greatly appreciated.
> >
> >Here's the messages I'm getting:
> > link /dll /debug mapbits.obj maphash.obj mapshape.obj
> >mapxbase.obj mapparser.obj maplexer.obj mapindex.obj maptree.obj
> >mapsearch.obj mapstring.obj mapsymbol.obj mapfile.obj maplegend.obj
> >maputil.obj mapscale.obj mapquery.obj maplabel.obj maperror.obj
> >mapprimitive.obj mapproject.obj mapraster.obj cgiutil.obj mapsde.obj
> >mapogr.obj maptime.obj maptemplate.obj mappostgis.obj maplayer.obj
> >mapresample.obj mapwms.obj mapwmslayer.obj mapgml.obj
> >maporaclespatial.obj mapprojhack.obj mapdraw.obj mapgd.obj
> >mapoutput.obj mapswf.obj mapgdal.obj mapwfs.obj mapwfslayer.obj
> >mapows.obj maphttp.obj mappdf.obj mapcontext.obj mapdrawgdal.obj
> >mapjoin.obj mapgraticule.obj mapmygis.obj mapimagemap.obj mapcopy.obj
> >mapogcfilter.obj mapogcsld.obj mapthread.obj epplib.obj
> >d:/projects/mapserver/php-4.3.6\regex\regcomp.obj
> >d:/projects/mapserver/php-4.3.6\regex\regerror.obj
> >d:/projects/mapserver/php-4.3.6\regex\regexec.obj
> >d:/projects/mapserver/php-4.3.6\regex\regfree.obj
> >d:/projects/mapserver/gd-2.0.15gif/gd.lib
> >d:/projects/mapserver/gdal-1.2.0b/frmts/jpeg/libjpeg/libjpeg.lib
> >d:/projects/mapserver\libpng-1.2.5/libpng.lib
> >d:/projects/mapserver/zlib-1.2.1/zlib.lib
> >d:/projects/mapserver/freetype-2.1.4/objs/freetype214.lib
> >d:/projects/mapserver/gdal-1.2.0b/frmts/jpeg/libjpeg/libjpeg.lib
> >d:\projects\mapserver\proj-4.4.8/src/proj.lib
> >d:\projects\mapserver\gdal-1.2.0b/ogr/ogrsf_frmts/ogrsf_frmts.lib
> >d:\projects\mapserver\gdal-1.2.0b/ogr/ogrsf_frmts/ogrsf_frmts_sup.lib
> >d:\projects\mapserver\gdal-1.2.0b/ogr/ogr.lib
> >d:\projects\mapserver\gdal-1.2.0b/ogr/../port/cpl.lib
> >d:\projects\mapserver\gdal-1.2.0b/gdal_i.lib
> >d:/projects/mapserver/curl-7.11.1/lib/libcurl.lib
> >d:/projects/mapserver/ming-0.2a/src/libming.lib
> >d:/projects/mapserver/pdflib-4.0.3/pdflib/pdflib.lib "C:\Program
> >Files\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Lib\WSOCK32.LIB"
> >d:\projects\mapserver\postgresql-7.3.4/src/interfaces/libpq/release/libpqdll.lib
> >c:\apps\xerces-c1_7_0-win32/lib/xerces-c_1.lib
> >C:\Progra~1\Earthr~1\ECWSDK~1\lib\NCSEcw.lib
> >C:\Progra~1\Earthr~1\ECWSDK~1\lib\NCSEcw
> >C.lib C:\Progra~1\Earthr~1\ECWSDK~1\lib\NCSUtil.lib "C:\Program
> >Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Lib\odbc32.lib"
> >/out:libmap.dll /implib:mapserver_i.lib
> >Microsoft (R) Incremental Linker Version 7.10.3077
> >Copyright (C) Microsoft Corporation. All rights reserved.
> >
> >LIBCD.lib(dbgheap.obj) : error LNK2005: _malloc already defined in
> >LIBC.lib(malloc.obj)
> >LIBCD.lib(dbgheap.obj) : error LNK2005: __nh_malloc already defined in
> >LIBC.lib(malloc.obj)
> >LIBCD.lib(dbgheap.obj) : error LNK2005: __heap_alloc already defined in
> >LIBC.lib(malloc.obj)
> >LIBCD.lib(dbgheap.obj) : error LNK2005: _calloc already defined in
> >LIBC.lib(calloc.obj)
> >LIBCD.lib(dbgheap.obj) : error LNK2005: _realloc already defined in
> >LIBC.lib(realloc.obj)
> >LIBCD.lib(dbgheap.obj) : error LNK2005: _free already defined in
> >LIBC.lib(free.obj)
> >LIBCD.lib(dbgheap.obj) : error LNK2005: __msize already defined in
> >LIBC.lib(msize.obj)
> >LIBCD.lib(sbheap.obj) : error LNK2005: __get_sbh_threshold already
> >defined in LIBC.lib(sbheap.obj)
> >LIBCD.lib(sbheap.obj) : error LNK2005: __set_sbh_threshold already
> >defined in LIBC.lib(sbheap.obj)
> >LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_heap_init already defined
> >in LIBC.lib(sbheap.obj)
> >LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_find_block already defined
> >in LIBC.lib(sbheap.obj)
> >LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_free_block already defined
> >in LIBC.lib(sbheap.obj)
> >LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_alloc_block already
> >defined in LIBC.lib(sbheap.obj)
> >LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_alloc_new_region already
> >defined in LIBC.lib(sbheap.obj)
> >LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_alloc_new_group already
> >defined in LIBC.lib(sbheap.obj)
> >LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_resize_block already
> >defined in LIBC.lib(sbheap.obj)
> >LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_heapmin already defined in
> >LIBC.lib(sbheap.obj)
> >LIBCD.lib(sbheap.obj) : error LNK2005: ___sbh_heap_check already defined
> >in LIBC.lib(sbheap.obj)
> >LIBCD.lib(dbgheap.obj) : warning LNK4006: _malloc already defined in
> >LIBC.lib(malloc.obj); second definition ignored
> >LIBCD.lib(dbgheap.obj) : warning LNK4006: __nh_malloc already defined in
> >LIBC.lib(malloc.obj); second definition ignored
> >LIBCD.lib(dbgheap.obj) : warning LNK4006: __heap_alloc already defined
> >in LIBC.lib(malloc.obj); second definition ignored
> >LIBCD.lib(dbgheap.obj) : warning LNK4006: _calloc already defined in
> >LIBC.lib(calloc.obj); second definition ignored
> >LIBCD.lib(dbgheap.obj) : warning LNK4006: _realloc already defined in
> >LIBC.lib(realloc.obj); second definition ignored
> >LIBCD.lib(dbgheap.obj) : warning LNK4006: _free already defined in
> >LIBC.lib(free.obj); second definition ignored
> >LIBCD.lib(dbgheap.obj) : warning LNK4006: __msize already defined in
> >LIBC.lib(msize.obj); second definition ignored
> >LIBCD.lib(sbheap.obj) : warning LNK4006: __get_sbh_threshold already
> >defined in LIBC.lib(sbheap.obj); second definition ignored
> >LIBCD.lib(sbheap.obj) : warning LNK4006: __set_sbh_threshold already
> >defined in LIBC.lib(sbheap.obj); second definition ignored
> >LIBCD.lib(sbheap.obj) : warning LNK4006: ___sbh_heap_init already
> >defined in LIBC.lib(sbheap.obj); second definition ignored
> >LIBCD.lib(sbheap.obj) : warning LNK4006: ___sbh_find_block already
> >defined in LIBC.lib(sbheap.obj); second definition ignored
> >LIBCD.lib(sbheap.obj) : warning LNK4006: ___sbh_free_block already
> >defined in LIBC.lib(sbheap.obj); second definition ignored
> >LIBCD.lib(sbheap.obj) : warning LNK4006: ___sbh_alloc_block already
> >defined in LIBC.lib(sbheap.obj); second definition ignored
> >LIBCD.lib(sbheap.obj) : warning LNK4006: ___sbh_alloc_new_region already
> >defined in LIBC.lib(sbheap.obj); second definition ignored
> >LIBCD.lib(sbheap.obj) : warning LNK4006: ___sbh_alloc_new_group already
> >defined in LIBC.lib(sbheap.obj); second definition ignored
> >LIBCD.lib(sbheap.obj) : warning LNK4006: ___sbh_resize_block already
> >defined in LIBC.lib(sbheap.obj); second definition ignored
> >LIBCD.lib(sbheap.obj) : warning LNK4006: ___sbh_heapmin already defined
> >in LIBC.lib(sbheap.obj); second definition ignored
> >LIBCD.lib(sbheap.obj) : warning LNK4006: ___sbh_heap_check already
> >defined in LIBC.lib(sbheap.obj); second definition ignored
> > Creating library mapserver_i.lib and object mapserver_i.exp
> >LINK : warning LNK4098: defaultlib 'LIBCD' conflicts with use of other
> >libs; use /NODEFAULTLIB:library
> >libmap.dll : fatal error LNK1169: one or more multiply defined symbols
> >found
> >NMAKE : fatal error U1077: 'link' : return code '0x491'
> >Stop.
> >
> >
> >On Mon, 2004-06-21 at 14:17, Howard Butler wrote:
> > > Assefa,
> > >
> > > I am trying to compile Windows MapServer, but I am having trouble getting
> > > regex to behave when it comes time to link. Apparently, many others have
> > > had trouble as well
> > >
> > <http://www.google.com/search?q=regex.obj+:+error+LNK2001:+unresolved+external+symbol+_printchar&hl=en&lr=&ie=UTF-8&c2coff=1&start=10&sa=N&filter=0>.
> > >
> > > Here is the link error:
> > > regex.obj : error LNK2001: unresolved external symbol _printchar
> > >
> > > I have tried every permutation of putting that symbol in the header,
> > making
> > > sure it is extern'ed properly (in both the C file and the header), but
> > I am
> > > having no luck. I grepped through my VC++ include files and my cygwin
> > > include files for that function prototype (printchar), but I cannot
> > find it
> > > anywhere.
> > >
> > > If you have any ideas of other things I might try, I'd greatly
> > appreciate it.
> > >
> > > Thanks
> > >
> > > Howard
> > >
> > > --------------------------------------------------------
> > > Howard Butler
> > > Department of Statistics
> > > Center for Survey Statistics and Methodology
> > > Iowa State University
> > > 212 Snedecor Hall
> > > Ames, IA 50011
> > > --------------------------------------------------------
> > > http://hobu.biz
> > > --------------------------------------------------------
> > >
> > > _______________________________________________
> > > Mapserver-users mailing list
> > > Mapserver-users at lists.gis.umn.edu
> > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> >--
> >"He's no geek.His tan's too good." -Benjamin Choate
--
"He's no geek.His tan's too good." -Benjamin Choate
More information about the MapServer-users
mailing list