tsp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tsp-devel] tsp_ascii_writer_config.lex compile problem


From: Eric Noulard
Subject: Re: [Tsp-devel] tsp_ascii_writer_config.lex compile problem
Date: Mon, 26 Mar 2007 10:55:31 +0100

2007/3/26, Frederik Deweerdt <address@hidden>:
Hi,

$ bison --version
bison (GNU Bison) 2.3
$ flex --version
flex 2.5.33
$ gcc --version
gcc (GCC) 4.1.2

The build fails with the following error:
/home/def/Prog/tsp/src/consumers/ascii_writer/tsp_ascii_writer_config.lex:44: 
error: conflicting types for 'yytext'
/home/def/Prog/tsp/src/consumers/ascii_writer/tsp_ascii_writer_config_yy.c:507: 
error: previous declaration of 'yytext' was here
/home/def/Prog/tsp/src/consumers/ascii_writer/tsp_ascii_writer_config_yy.c: In 
function 'yylex':

It seems that yytext should be declared as follows:
extern char yytext[];
instead of
extern char *yytext;

I had the fix pushed, but I wondered if it would affect some systems out
there, so I've reverted it. Any thoughts?

Really don't know...

I only remember we depend on flex (plain old lex may not work).

I do not have the trouble even I have the exact same version
of bison and flex AND gcc.

But don't you build in-source?

Could you try an out of source build.
The tsp_ascii_writer_config_yy.c should be generated in the
build tree from tsp_ascii_writer_config.lex.

The in-source
tsp/src/consumers/ascii_writer/tsp_ascii_writer_config_yy.c

may not match your flex version.

on my box generated file and in source file are really different.

--
Erk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]