problem: compiling mapserver on windows

Frank Warmerdam warmerdam at POBOX.COM
Mon Jul 10 09:40:44 EDT 2006


Thibaut Le Pape wrote:
> Hello everyone,
> 
> I tried to compile mapserver under windows, so I installed all the 
> librairies needed and I get this error message (I use Visual Studio 8 to 
> compile it):
> 
> LIBC.lib(crt0dat.obj) : error LNK2005: __cinit already defined in 
> LIBCMT.lib(crt

Thibaut,

The above message indicates you are linking in two different versions of
the standard C library.  In your case the "default" c library (libc.lib),
and the multi-threaded version (libcmt.lib).  This normally occurs when
some of the obj files being linked in are built with /MT and some are not.
Assuming you are consistently using (or not using) /MT, then it is likely
due to linking in a static .lib file from a supporting package that
is compiled differently.

My suggestions are:

  o Make sure /MT is consistently being used in compiling mapserver.  I
    can't think of any reason this wouldn't be the case assuming you are
    using the normal nmake makefiles.

  o Try removing dependencies from as many external libraries as possible,
    to establish which library is causing the conflict.

  o Give up and use someone elses binaries... :-)

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org



More information about the mapserver-users mailing list