[Shapelib] How to compile Shapefile C Library in CYGWIN ??

Curt, WE7U archer at eskimo.com
Wed Jan 4 17:20:17 EST 2006


On Wed, 4 Jan 2006, Lei, Kuo-Rong wrote:

>   I want to use gen2shp in CYGWIN, so I need to compile Shapefile
>   C Library. But when I use "make lib", there were errors:
>
> dbfopen.lo: In function `DBFReadAttribute':
> /cygdrive/d/cygwin/opt/shapelib-1.2.10/dbfopen.c:716: undefined reference to `__getreent'
> /cygdrive/d/cygwin/opt/shapelib-1.2.10/dbfopen.c:724: undefined reference to `__getreent'

For our project we needed to do a tweak in order to compile on
Cygwin.  Here's the important part of the script:

----------------------
# Need a couple fixes for shapelib on Cygwin.
if [ $UNAME = 'Cygwin' ]
then
  mv Makefile Makefile.dist
  sed -e "s/h libshp.so/hlibshp.sl/" -e "s/-lc/-lcygwin/" < Makefile.dist > Makefile
fi

make
make lib
----------------------

I think that might be the fix you're looking for.

--
Curt, WE7U.   APRS Client Comparisons: http://www.eskimo.com/~archer
"Lotto:    A tax on people who are bad at math." -- unknown
"Windows:  Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me:  I picked the coordinate system!"


More information about the Shapelib mailing list