Le 19 déc. 2013 à 19:15, Gilberto Monroy <gilbertomonr...@gmail.com> a écrit :
> Akim: > 1 Yeah, you are right, I removed the .h and .hh files from the compilation > line, but the result is the same. > 2 Actually, the .hh file is included in rcss_driver.h, wich is included in > rcss_parser.y. John is right, there are inclusion guardas in the .hh file, > that is not the problem. Yes. > I changed the code a bit in a way I do not > (directly or indirectly) include the .hh file in the .y file, but the > result is similar: > > g++ -o parser rcss_parser.tab.cc lex.yy.c rcss_parser_driver.cpp -lfl > In file included from rcss_parser.tab.cc:53:0: > rcss_parser.tab.hh:583:3: error: > ‘yy::RcssParser::basic_symbol<Base>::basic_symbol(typename Base::kind_type, > Playmode, const location_type&)’ cannot be overloaded > rcss_parser.tab.hh:579:3: error: with > ‘yy::RcssParser::basic_symbol<Base>::basic_symbol(typename Base::kind_type, > Playmode, const location_type&)’ > rcss_parser.tab.hh:1896:3: error: redefinition of > ‘yy::RcssParser::basic_symbol<Base>::basic_symbol(typename Base::kind_type, > Playmode, const location_type&)’ > rcss_parser.tab.hh:1882:3: error: > ‘yy::RcssParser::basic_symbol<Base>::basic_symbol(typename Base::kind_type, > Playmode, const location_type&)’ previously declared here > In file included from rcss_lexer.l:28:0: > rcss_parser.tab.hh:583:3: error: > ‘yy::RcssParser::basic_symbol<Base>::basic_symbol(typename Base::kind_type, > Playmode, const location_type&)’ cannot be overloaded > rcss_parser.tab.hh:579:3: error: with > ‘yy::RcssParser::basic_symbol<Base>::basic_symbol(typename Base::kind_type, > Playmode, const location_type&)’ > rcss_parser.tab.hh:1896:3: error: redefinition of > ‘yy::RcssParser::basic_symbol<Base>::basic_symbol(typename Base::kind_type, > Playmode, const location_type&)’ > rcss_parser.tab.hh:1882:3: error: > ‘yy::RcssParser::basic_symbol<Base>::basic_symbol(typename Base::kind_type, > Playmode, const location_type&)’ previously declared here > make: *** [parser] Error 1 We would really need to be able to reproduce this if you want us to track down your problem. Can you send your input files?