[mapserver-dev] Problems for adding a new keyword in MapServer

Alan Boudreault aboudreault at mapgears.com
Sat May 23 10:28:15 EDT 2009


Hi Mauricio,

You should not have to run flex by yourself. The MapServer Makefile will 
do it. Make sure you did a "make clean" and a "make" to regenerate 
everything.

Thanks,
Alan

Mauricio Herrera wrote:
> Hi developer community
>
> Could you help me??
>
>
> I am trying  to add  a new keyword in MapServer (Only for experimental 
> purpose).. but I could not do it. I just want that my keyword is 
> detected (recognized) by the MapServer (mapserv)  when I write the 
> keyword in the mapfile (.map)
>
> Until now I have modified the next files:
>
>     * *maplexer.l *:   I added this declaration
>       <INITIAL,URL_VARIABLE>start { return(START); } */      I am
>       using this syntax: flex -Pmsyy -i -omaplexer.c maplexer.l  for
>       compiling maplexer.l
>
>     * *mapfile.h* :  I added new keyword and id   # Define START 1300 
>     * *mapfile.c*:  only  I added the new keyword in a SWITCH of
>       loadclass function     CASE START: printf ("Keyword is
>       here");break; */
>
>
>        After I did  MAKE in the command line for compiling these 
> files.  And inmediatly these errors appear:
>
>
> ./libmapserver.a(mapfile.o): In function `msUpdateQueryMapFromString':
> mapfile.c:(.text+0x65af): undefined reference to `msyylex_destroy'
> ./libmapserver.a(mapfile.o): In function `msUpdateReferenceMapFromString':
> mapfile.c:(.text+0x69f2): undefined reference to `msyylex_destroy'
> ./libmapserver.a(mapfile.o): In function `msUpdateStyleFromString':
> mapfile.c:(.text+0x705f): undefined reference to `msyylex_destroy'
> ./libmapserver.a(mapfile.o): In function `msUpdateScalebarFromString':
> mapfile.c:(.text+0x7daf): undefined reference to `msyylex_destroy'
> ./libmapserver.a(mapfile.o): In function `msUpdateLegendFromString':
> mapfile.c:(.text+0x81d5): undefined reference to `msyylex_destroy'
> ./libmapserver.a(mapfile.o):mapfile.c:(.text+0x8258): more undefined 
> references to `msyylex_destroy' follow
> collect2: ld returned 1 exit status
> make: *** [shp2img] Error 1
>
>
>
> *My questions are:*
>
> Should I modify other files for adding a new keyword? or Should I need 
> to do another thing ( maybe  write "special command" or declaration)?
>
>
> *Additional information*
>
> I have installed on my pc
>
> Mapserver 5.2.1 
> Flex 2.5.4a.-41  
> S.O. CentOS 5
> Bison 2.3.2.1
>
>
>
> Thank you so much!
>
> Mauricio
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>   


-- 
Alan Boudreault
Mapgears
http://www.mapgears.com/ 



More information about the mapserver-dev mailing list