<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt">Dear all,<br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div> this is a simple program I' writting in order to collect the shapefile type:<br>#include "shapelib/shapefil.h"<br>#include <string.h><br>#include <stdlib.h><br>#include <stdio.h><br><br>int main (int argc, char ** argv)<br>{<br>     char * filepath;<br>     char *  accessType;<br>    int *  pnEntities;<br>    int * pnShapeType = NULL;<br>        double * padfMinBound; <br>    double *
 padfMaxBound;<br>    SHPHandle hSHP;<br>    FILE * istream;<br><br>    filepath= "/home/geotema/valatest/data/point_bycicle_sharing.shp";<br>    accessType= "rb";<br>   
 <br>    if ( (istream = fopen ( filepath, "rb" ) ) == NULL )<br>    {<br>        printf ( "file non-existant!\n" );<br>    }<br>    else<br>    {<br>        printf ( "file exists!\n" );<br>            <br>    hSHP = SHPOpen(filepath,"rb");<br>    <br>    SHPGetInfo(hSHP,pnEntities,pnShapeType, padfMinBound, padfMaxBound);<br>    hSHP = (SHPHandle)malloc(sizeof(SHPHandle));<br>    printf("hELLO World \nShape type %d\n  ", hSHP->nShapeType);<br>        fclose ( istream );<br>    }<br><br>    return 1;<br>}<br><br>In order to link my program with the shape lib, what I've through my Makefile.am is defining the following
 parameters:<br><br>bin_PROGRAMS= readshapetest<br>readshapetest_SOURCES = readshapetest.c shapelib/shpopen.c shapelib/shapefil.h <br>clean:<br>    rm -f *.o *.c<br><br>the compiling step is successful, unfortunately I'm keeping on having 0 as output. can you please tell me where I'm failing<br><br>Cheers.......<br></div>
</div><br>




      </div></div>
</div><br>




      </body></html>