[gdal-dev] fail to build gdal 1.9 with minGW

chenliang wang hi181904665 at msn.com
Thu Mar 29 11:49:11 EDT 2012


I think I get it more clearly. It 's a linking problem now. When I 
compiled GDAL 1.9 linked statically with proj. I got the error 
'undefined reference to 'pj_init' '. The libray 'libproj.a' must be set 
in my project. But I use same configure script to test my GDAL 1.6. It 
turns out that I just need to set ' libgdal.a' without ' libproj.a' .
How can I make the linking way of GDAL 1.9 just like 1.6 ?

于 2012-3-29 16:23, Even Rouault 写道:
> Selon chenliang wang<hi181904665 at msn.com>:
>
>> Thanks for your reply. I have tried 'make clean' and then rebuild GDAL.
>> And I have also modified GNUmakefile ,replaed '${GDAL_ROOTs}' for '.'
>> and then 'make clean' and rebuild it again. Unfortunately, I failed
>> again. I use command ' ./configure --prefix=..... ' Should I need to add
>> option '--host=mingw32' or '--without-libtool'?
> I have not a mingw environment to test. Is it a compilation problem or a linking
> problem ?
>
>> 于 2012-3-29 15:52, Even Rouault 写道:
>>> Selon chenliang wang<hi181904665 at msn.com>:
>>>
>>>> hi:
>>>> I failed to build gdal 1.9 with minGW. I modified 'cpl_multiproc.h' with
>>>> the patch.But there are still errors with build:cpl_multiproc.cpp:73:
>>>> undefined reference to `CPLCreateOrAcquireMutex' .Pls help me out.Thanks!
>>>>
> -------------------------------------------------------------------------------
>>>> #if defined(WIN32)&&   !defined(CPL_MULTIPROC_STUB)
>>>> # define CPL_MULTIPROC_WIN32
>>>> /* MinGW can have pthread support, so disable it to avoid issues */
>>>> /* in cpl_multiproc.cpp */
>>>> # undef CPL_MULTIPROC_PTHREAD
>>>> #endif
>>>>
> ------------------------------------------------------------------------------------
>>> Did you 'make clean' after applying the patch and before rebuilding GDAL ?
>> The
>>> reporter of https://trac.osgeo.org/gdal/ticket/4430 confirmed that the
>> above
>>> patch fixed building for him.
>>>
>>>> Chen-liang Wang
>>>> _______________________________________________
>>>> 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