<div>Thanks a lot for your replay! </div><div><br></div><div> 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.<br></div><div> 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.</div>
<div>
Best regards!
and thank you again! </div><br><div class="gmail_quote">On Tue, Aug 30, 2011 at 11:22 PM, Frank Warmerdam <span dir="ltr"><<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div class="h5">On 11-08-30 01:12 AM, tang qingyuan wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
HI !<br>
gdal is default build to dynamic lib with visual studio.How can I build it<br>
to static lib ? Maybe a stupid question,But I cannot get the answer on mail<br>
list. Thanks!<br>
</blockquote>
<br></div></div>
Tang Qingyuan,<br>
<br>
In fact, I think you can get the answer on the mailing list!<br>
<br>
I believe a default build of GDAL includes creation of the gdal.lib static<br>
library which you can use to build against. I think if you comment out the<br>
following line in the nmake.opt file, then the gdal.lib will be used by<br>
default when linking the commandline programs instead of the DLL stub library<br>
(gdal_i.lib).<br>
<br>
# Uncomment the following to link OGR utilities against main GDAL DLL<br>
# instead of statically linking against OGR libraries.<br>
DLLBUILD=1<br>
<br>
I must confess to not having used this in some time so it could be broken.<br>
<br>
Best regards,<br>
-- <br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/~warmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush | Geospatial Programmer for Rent<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br>