[Mapserver-users] mapscript.i question
Robert Thibadeau
rht at cs.cmu.edu
Fri Jul 30 15:41:11 PDT 2004
>From the 4.2.1 release the perl mapscript readme says:
If the mapscript_wrap.c file does not exist, copy the mapscript.i file
into this directory and run 'swig -shadow -perl5 mapscript.i'. If you do
not have swig, be sure to install the **SWIG Version 1.1 (Build 883)** not
the
1.3.x development release.
Swig 1.1 fails on
%typemap(memberin,warning="451:Setting const char * member may leak
memory.") const char * {
if ($input) {
$1 = ($1_type) malloc(strlen($input)+1);
strcpy((char*)$1,$input);
} else {
$1 = 0;
}
}
and the like with a input syntax error which the second arg in the typemap
(warning ...) seems to spring.
However, using the
SWIG Version 1.3.21
Copyright (c) 1995-1998
University of Utah and the Regents of the University of California
Copyright (c) 1998-2003
University of Chicago
Compiled with g++ [i686-pc-linux-gnu]
does not throw the error.
This is kind of a catch 22: using the preferred swig throws an input syntax
error
and using the wrong compiles (at least). What should I believe? What is
wrong
with swig 1.3?
regards, Bob
More information about the MapServer-users
mailing list