[gdal-dev] question about build static gdal with visual studio
tang
tang312 at gmail.com
Tue Aug 30 21:58:38 EDT 2011
Thanks a lot for your replay!
I got the gdal.lib,but while I link the program to this lib,it still
needs gdal18.dll. this confused me . I had tried to comment out
DLLBUILD=1 , but the commandline programs need gdal18.dll too. even
replacing all gdal_i.lib with gdal.lib helps nothing.
I know little about nmake/cl/link, whitch are used in the gdal's vs
slution. It seems in linux configure we can build static gdal with
--enalbe-static,but I don‘t know how to do this in VS nmake.
Best regards! and thank you again!
On Tue, Aug 30, 2011 at 11:22 PM, Frank Warmerdam <warmerdam at pobox.com>wrote:
> On 11-08-30 01:12 AM, tang qingyuan wrote:
>
>> HI !
>> gdal is default build to dynamic lib with visual studio.How can I
>> build it
>> to static lib ? Maybe a stupid question,But I cannot get the answer on
>> mail
>> list. Thanks!
>>
>
> Tang Qingyuan,
>
> In fact, I think you can get the answer on the mailing list!
>
> I believe a default build of GDAL includes creation of the gdal.lib static
> library which you can use to build against. I think if you comment out the
> following line in the nmake.opt file, then the gdal.lib will be used by
> default when linking the commandline programs instead of the DLL stub
> library
> (gdal_i.lib).
>
> # Uncomment the following to link OGR utilities against main GDAL DLL
> # instead of statically linking against OGR libraries.
> DLLBUILD=1
>
> I must confess to not having used this in some time so it could be broken.
>
> 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 | Geospatial Programmer for Rent
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110831/9fc23259/attachment-0001.html
More information about the gdal-dev
mailing list