<div>Hi Frank,</div>
<div>&nbsp;</div>
<div>I downloaded the GDAL snapshot on 6th November 2006, so i assume it includes the latest changes. When I compile it without the GEOS support, i.e the following lines are commented in the nmake.opt file are commented:
</div>
<div>&nbsp;</div><font size="2">
<p>GEOS_CFLAGS = -IC:/GEOS/trunk/capi -DHAVE_GEOS</p>
<p>GEOS_LIB = C:/GEOS/trunk/source/geos_c_i.lib</p>
<div></div></font>But when I uncomment these lines and try to build the API it gives me the following link errors:<br>&nbsp;
<div>Creating library gdal_i.lib and object gdal_i.exp<br>ogr.lib(ogrgeometry.obj) : error LNK2019: unresolved external symbol _GEOSGeomFr<br>omWKB_buf referenced in function &quot;public: virtual struct GEOSGeom_t * __thiscall 
<br>&nbsp;OGRGeometry::exportToGEOS(void)const &quot; (<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:?exportToGEOS@OGRGeometry@@UBEPAUGEOSGe" target="_blank">?exportToGEOS@OGRGeometry@@UBEPAUGEOSGe</a>
 <br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:om_t@@XZ" target="_blank">om_t@@XZ</a>)<br>ogr.lib(ogrgeometry.obj) : error LNK2019: unresolved external symbol _GEOSConvex <br>Hull referenced in function &quot;public: virtual class OGRGeometry * __thiscall OGRG 
<br>eometry::ConvexHull(void)const &quot; (<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:?ConvexHull@OGRGeometry@@UBEPAV1@XZ" target="_blank">?ConvexHull@OGRGeometry@@UBEPAV1@XZ</a> )<br>ogr.lib(ogrgeometry.obj
 ) : error LNK2019: unresolved external symbol _GEOSBounda<br>ry referenced in function &quot;public: virtual class OGRGeometry * __thiscall OGRGeo<br>metry::getBoundary(void)const &quot; (<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:?getBoundary@OGRGeometry@@UBEPAV1@XZ" target="_blank">
 ?getBoundary@OGRGeometry@@UBEPAV1@XZ</a>)<br>ogr.lib(ogrgeometry.obj) : error LNK2019: unresolved external symbol _GEOSBuffer<br>&nbsp;referenced in function &quot;public: virtual class OGRGeometry * __thiscall OGRGeome<br>try::Buffer(double,int)const &quot; ( 
<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:?Buffer@OGRGeometry@@UBEPAV1@NH@Z" target="_blank">?Buffer@OGRGeometry@@UBEPAV1@NH@Z</a>)<br>ogr.lib(ogrgeometry.obj) : error LNK2019: unresolved external symbol _GEOSInters 
<br>ection referenced in function &quot;public: virtual class OGRGeometry * __thiscall OG <br>RGeometry::Intersection(class OGRGeometry const *)const &quot; (<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:?Intersection@OGRGeom" target="_blank">
 ?Intersection@OGRGeom</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:etry@@UBEPAV1@PBV1@@Z" target="_blank">etry@@UBEPAV1@PBV1@@Z</a>)<br>ogr.lib(ogrgeometry.obj ) : error LNK2019: unresolved external symbol _GEOSUnion 
<br>referenced in function &quot;public: virtual class OGRGeometry * __thiscall OGRGeomet<br>ry::Union(class OGRGeometry const *)const &quot; (<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:?Union@OGRGeometry@@UBEPAV1@PBV1@@Z" target="_blank">
 ?Union@OGRGeometry@@UBEPAV1@PBV1@@Z</a><br>)<br>ogr.lib(ogrgeometry.obj) : error LNK2019: unresolved external symbol _GEOSDiffer<br>ence referenced in function &quot;public: virtual class OGRGeometry * __thiscall OGRG<br>
eometry::Difference(class OGRGeometry const *)const &quot; (<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:?Difference@OGRGeometry" target="_blank">?Difference@OGRGeometry</a>@@<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:UBEPAV1@PBV1@@Z" target="_blank">
UBEPAV1@PBV1@@Z</a>)<br>ogr.lib(ogrgeometry.obj) : error LNK2019: unresolved external symbol _GEOSSymDif <br>ference referenced in function &quot;public: virtual class OGRGeometry * __thiscall O<br>GRGeometry::SymmetricDifference(class OGRGeometry const *)const &quot; (?SymmetricDif 
<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:ference@OGRGeometry@@UBEPAV1@PBV1@@Z" target="_blank">ference@OGRGeometry@@UBEPAV1@PBV1@@Z</a>)<br>ogr.lib(ogrpolygon.obj) : error LNK2019: unresolved external symbol _GEOSGetCent 
<br>roid referenced in function &quot;public: virtual int __thiscall OGRPolygon::Centroid<br>(class OGRPoint *)const &quot; ( <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:?Centroid@OGRPolygon@@UBEHPAVOGRPoint@@@Z" target="_blank">
?Centroid@OGRPolygon@@UBEHPAVOGRPoint@@@Z</a>)<br>gdal13.dll : fatal error LNK1120: 9 unresolved externals<br>NMAKE : fatal error U1077: 'link' : return code '0x460' <br>Stop.</div>
<div>&nbsp;</div>
<div>Is there something else that I need to do in addition to the changes mentioned above to the nmake.opt file. Please note that I am using the latest version of the GEOS API. I checked it out from the subversion trunk and built it. It builds fine without any errors or warnings.
</div>
<div>&nbsp;</div>
<div>Best Regards</div>
<div>&nbsp;</div>
<div>Mir<br>&nbsp;</div>
<div><span class="gmail_quote">On 11/13/06, <b class="gmail_sendername">Frank Warmerdam</b> &lt;<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Mir Hassan Ali wrote:<br>&gt; Hi<br>&gt;<br>&gt; I am trying to build GDAL with GEOS support and I am getting these
<br>&gt; linker errors<br><br>Mir,<br><br>This summer Mateusz Loskot did quite a bit of improvement to the GEOS<br>handling within GDAL/OGR and I'd suggest you try using the latest<br>working GDAL code (rather than the spring release code - 
1.3.2).<br><br>Grab a daily cvs snapshot from:<br><br>&nbsp;&nbsp;<a href="http://gdal.maptools.org/dl/daily">http://gdal.maptools.org/dl/daily</a><br><br>Note that now GDAL uses the GEOS C API instead of the C++ api which<br>can avoid a number of problems.
<br><br>Best regards,<br>--<br>---------------------------------------+--------------------------------------<br>I set the clouds in motion - turn up&nbsp;&nbsp; | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com
</a><br>light and sound - activate the windows | <a href="http://pobox.com/~warmerdam">http://pobox.com/~warmerdam</a><br>and watch the world go round - Rush&nbsp;&nbsp;&nbsp;&nbsp;| President OSGeo, <a href="http://osgeo.org">http://osgeo.org
</a><br><br>_______________________________________________<br>geos-devel mailing list<br><a href="mailto:geos-devel@geos.refractions.net">geos-devel@geos.refractions.net</a><br><a href="http://geos.refractions.net/mailman/listinfo/geos-devel">
http://geos.refractions.net/mailman/listinfo/geos-devel</a><br></blockquote></div><br>