[FWTools] FWTools linker error with GEOSCoordSeq

Zachary Stauber zstauber at bhinc.com
Mon Nov 13 09:53:35 EST 2006


I believe this is an FWTools build issue, not necessarily a bug, but something I hope is just a config switch that Frank can change when he builds.  In the geos_c.h file I see the way to create a point from scratch is to create a GEOSCoordSeq_create(1, 2) and then add X and Y values with GEOSCoordSeq_setX and GEOSCoordSeq_setY, then create a GEOSGeom point from the sequence.  However, I get the linker error from Visual C++ Express 2005:

 

1>Linking...

1>   Creating library M:\vc05\fwtools-test\Debug\gdal_clip.lib and object M:\vc05\fwtools-test\Debug\gdal_clip.exp

1>gdal_clip.obj : error LNK2019: unresolved external symbol _GEOSCoordSeq_create referenced in function _main

1>M:\vc05\fwtools-test\Debug\gdal_clip.exe : fatal error LNK1120: 1 unresolved externals

 

In other words, it can compile GEOSCoordSeq_create because it’s in the header files, but not link to it.  initGEOS() works fine, GEOSIntersects links fine, GEOSGeomFromWKB_buf links fine, so I know I have at least some GEOS functionality.  I have the following files linked:

C:¥program files¥FWTools1.0.8¥lib¥gdal_i.lib

C:¥program files¥FWTools1.0.8¥lib¥geos_i.lib

 

And the following includes:

#include "stdafx.h"

#include <iostream>

#include "cpl_conv.h"

#include "ogr_api.h"

#include "ogrsf_frmts.h"

#define HAVE_GEOS /* Since this is defined, we'll get geos_c.h loaded in the next file. */

#include "ogr_geos.h"

 

The GEOSCoordSeq_create is listed in geos_c.h as an extern just like the other functions that do work, so I’m not sure why it isn’t linking.  A text search through the fairly binary geos_i.lib doesn’t reveal any “coordseq” methods at all.

 

Zachary L. Stauber

Certified Mapping Scientist

Bohannan▲Huston 

Courtyard One, 7500 Jefferson N.E.

Albuquerque, New Mexico  87109

Office: 505-823-1000

Direct: 505-798-7970

Fax: 505-798-7932

Email: zstauber at bhinc.com <mailto:zstauber at bhinc.com> 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20061113/b735a6e5/attachment.html


More information about the FWTools mailing list