[gdal-dev] Win build issues

Even Rouault even.rouault at mines-paris.org
Mon Apr 23 12:28:07 EDT 2012


Selon Joaquim Luis <jluis at ualg.pt>:

> Hi again,
>
> A couple of weeks ago I referred to a problem building the Win version
> and at the end thought the problem was due to the WEBP driver. But now
> I'm getting the same type of errors with another driver and, ... one nuance
>
> To remember, the errors are are of the type
>
> LIBCMT.lib(dosmap.obj) : error LNK2005: __errno already defined in
> MSVCRT.lib(MSVCR100.dll)
> LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in
> MSVCRT.lib(MSVCR100.dll)
> LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in
> MSVCRT.lib(MSVCR100.dll)
>
> but now they occur when I build also with the poppler (0.19) driver,
> which uses a static lib (that's what CMake produces). I used to be able
> to build with this same configuration so something has changed that now
> causes this errors. But there is more. If I do a first build WITHOUT the
> poppler driver and than run the building again but switching on the the
> linking with the poppler driver the build process runs without any
> linking error.

Hum, I have had similar error messages yesterday in a VS 2008 Express with
various third libraries configured. I finally solved them by changing the
LINKER_FLAGS in nmake.opt to

LINKER_FLAGS = /NODEFAULTLIB:LIBCMT

I'm not sure why this is necessary. I found that workaround by seaching on the
Net and this came up. I suspect indeed that it is due to some static build of a
third party lib that contains a version of the standard library. Might not be a
very safe option though.

>
> Joaquim
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>




More information about the gdal-dev mailing list