[Shapelib] Re : need some help

calpas calpas calpas2007 at yahoo.fr
Fri Mar 11 04:14:13 PST 2011


Dear Frank,

Thanks for your kindly message. I am quite a newbie I dont actually know how to 
link my program against the shapelib. Can you please provide me with a sample of 
Makefile that I might try. I'm using the autotools to build the program. I've 
gone through some tutorial but cannot come through.
thanks for your help

Cheers.





________________________________
De : Frank Warmerdam <warmerdam at pobox.com>
À : shapelib at lists.maptools.org
Envoyé le : Mer 9 mars 2011, 6h 54min 50s
Objet : Re: [Shapelib] need some help

On 11-03-09 06:19 AM, calpas calpas wrote:
> Dear all,
>
> I am writting my first C application to access the shapefile and retrieve some
> data. I'm trying to use the shapelib to achieve that unfortunately I'm keeping
> on having the following errors:
> /home/geotema/valatest/src/readshapetest.c:19: undefined reference to 
`SHPOpen'
> /home/geotema/valatest/src/readshapetest.c:21: undefined reference to 
>`SHPGetInfo'
>
> I cannot figure out what is missing. could anyone help me to sort out this 
>issue???

Calpas Calpas,

Presumably you are not linking against the shapelib modules.  You
don't give your compile or link information so I can't propose a
variation but basically you will likely need to include the object
code from shapelib in your link in some fashion.  Perhaps by listing
the paths to shpopen.o, dbfopen.o, safileio.o and perhaps shptree.o.

Looking at how the commandline programs in shapelib are linked in
shapelib/Makefile might give you a hint as to how to do so.

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

_______________________________________________
Shapelib mailing list
Shapelib at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/shapelib



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/shapelib/attachments/20110311/547d4d3e/attachment.html>


More information about the Shapelib mailing list