[gdal-dev] Win build issues

Joaquim Luis jluis at ualg.pt
Mon Apr 23 13:03:12 EDT 2012


On 23-04-2012 17:28, Even Rouault wrote:
> 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.
Thanks, Even

Indeed that solved the linking issue, but while I am at this I have to refer to still another problem.
For quite some time that build the mrsid driver (Geo_DSDK-7.0.0.2167) but now it errors with.

However, shouldn't it be trying to link against lti_dsdk_dll.lib instead of lti_dsdk.lib?
Again it seams be a 'static' thing that is coming in the way.


lti_dsdk.lib(MrSIDEncrypt.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>  >::const_iterator __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>  >::end(void)const " (__imp_?end@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QBE?AVconst_iterator at 12@XZ) referenced in function "public: static bool __cdecl
LizardTech::MrSIDEncrypt::keyMatchesLock(char const *,class LizardTech::Encryption const&)" (?keyMatchesLock at MrSIDEncrypt@LizardTech@@SA_NPBDABVEncryption at 2@@Z)




More information about the gdal-dev mailing list