[mapserver-dev] hoto add new key in mapfiles

Daniel Morissette dmorissette at mapgears.com
Fri Sep 4 08:55:25 EDT 2009


(Re-sending to the -dev list for the benefits of others who may run into 
the same thing)


Martin Kofahl wrote:
> Hi Daniel,
> no luck when compiling:
> 
> g++ ... -o shp2img
> ./libmapserver.a(mapfile.o): In function `getCharacter': mapfile.c:212: undefined reference to `msyylineno'
> ./libmapserver.a(mapfile.o): In function `getInteger': mapfile.c:202: undefined reference to `msyylineno'
> ./libmapserver.a(mapfile.o): In function `getDouble': mapfile.c:189: undefined reference to `msyylineno'
> ./libmapserver.a(mapfile.o): In function `getString': mapfile.c:176: undefined reference to `msyylineno'
> ./libmapserver.a(mapfile.o): In function `loadHashTable': mapfile.c:1706: undefined reference to `msyylineno'
> ./libmapserver.a(mapfile.o):mapfile.c:244: more undefined references to `msyylineno' follow
> collect2: ld returned 1 exit status
> 
> 

Sounds like a flex version issue related to msyylineno. See the 
following comment at the top of maplexer.l:


/* msyylineno is required for flex 2.5.4 and older, but is already 
defined by
  * flex 2.5.31 (bug 975).
  * Unfortunately there is no clean way to differenciate the two versions,
  * so we use the symbol YY_CURRENT_BUFFER_LVALUE to base our test since it
  * was not present in 2.5.4 and is present in 2.5.31. Hopefully that won't
  * put us in trouble with other versions. If that happens then we can
  * switch to using autoconf to detect the version.
  */
#ifndef YY_CURRENT_BUFFER_LVALUE
int msyylineno = 1;
#endif


Daniel
-- 
Daniel Morissette
http://www.mapgears.com/


More information about the mapserver-dev mailing list