[Shapelib] RE: Shapelib

shapelib at lists.maptools.org shapelib at lists.maptools.org
Wed May 5 05:31:44 PDT 2004


It works fine, I just made a shape File containing about 1000 points.

I'll make a procedure explaining what to do on NT and popose it to author with some examples.

 
Daniel
Bourges - FRANCE

-----Message d'origine-----
De : telaro bartolomeo [mailto:b.telaro at arpalombardia.it]
Envoyé : mardi 4 mai 2004 15:56
À : BABAULT.Daniel
Objet : R: Shapelib


>I read in perl-win32-users mailing list your problem compiling and using
Geo::shapelib on >Windows XP. I have similar problems, please could you tell
me what did you modify in order to compile geo::shapelib (with which
compiler ?) and whad did you do in order to compile perl without
multi-threading.
>
>Thanks in advance 
>
>Daniel BABAULT 
>
>daniel at babault.net 
>http://abul.babault.net 
>http://www.nav2000.com/LF1853 
>http://gps.babault.net 


Ciao Daniel
I compiled Geo::shapelib on my Win XP box with Visual Studio 6.0 (If also
you will use it remember to run the VCVARS32.BAT file, as it is explained in
perlwin32 tutorial)
The only changes I had to do, where in the
Geo-Shapelib-0.07\shapelib\Makefile.PL file where I deleted the argument
"rc" to $(AR) as explained in the "perXStut" and the flag "-Wall" from the
"DEFINE" line, I also put the option "/OUT:" in front of the
libshp$(LIB_EXT) as is need from the Microsoft Linker syntax.

Here is  my modified Geo-Shapelib-0.07\shapelib\Makefile.PL
##########################################################
use ExtUtils::MakeMaker;
$Verbose = 1;

my @incdirs = ('/usr/include','/usr/local/include');
my $incs = '';
foreach (@incdirs) {
    $incs .= " -I$_";
}

WriteMakefile(
	      NAME      => 'Geo::Shapelib::shputils',
	      INC	=> $incs,
	      DEFINE    => '-ggdb -DDEBUG',
	      clean     => {'FILES' => 'libshp$(LIB_EXT)'},
	      );

sub MY::top_targets {
'
pure_all ::

all :: static

static :: libshp$(LIB_EXT)

libshp$(LIB_EXT): $(O_FILES)
	$(AR) /OUT:libshp$(LIB_EXT) $(O_FILES)
	$(RANLIB) libshp$(LIB_EXT)
';
}

#############################################################

I really don't know if it is ok also with others compilers.

To compile perl without multi-threading you need to download the source code
from CPAN or Active perl, then edit Makefile you find in the win32
subdirectory and comment out the option regarding  multi-threading. I
commented out the USE_MULTI and the USE_ITHREADS options.

Obviously you should first build perl an then compile Geo:shapelib

You should find helpful reading the "perwin32 - Per under Windows" tutorial
in the perl's documentation and also the "perlXStut - Tutorial for writing
XSUBs".

After all I'm not really using geo:shapelib, I only successfully ran the
test.pl script, and the perl I built without multi-threading is on a test
machine, not production, so I'm really interested in your attempt. 

I hope this confused notes will be helpful for  you.
Write me any feedback.

Best regards (and sorry for my English)

bartolomeo telaro

Presidio Tecnico Areoportuale
A.R.P.A. Lombardia




More information about the Shapelib mailing list