Flex and Solaris

"Brad Teale" <bteale@univ-wea.com>
18 Oct 2003 15:31:03 -0400

          From comp.compilers

Related articles
Flex and Solaris bteale@univ-wea.com (Brad Teale) (2003-10-18)
| List of all articles for this month |

From: "Brad Teale" <bteale@univ-wea.com>
Newsgroups: comp.compilers
Date: 18 Oct 2003 15:31:03 -0400
Organization: Posted via Supernews, http://www.supernews.com
Keywords: lex, C++, question
Posted-Date: 18 Oct 2003 15:31:03 EDT

I'm using flex (2.5.4) and bison (1.35) on Solaris 8, but I have to use the
Sun Workshop 6 update 2 due to some other products we are using, which won't
compile with GNU compilers. The problem is, I can't seem to get the
yyFlexLexer class to compile. It gives me a bunch of errors that maybe
possible to solve if I edit the FlexLexer.h file, but I would rather not
mess with the provided header files. Is there a solution? Maybe a compiler
option I'm missing?


Any help would be greatly appreciated!
Thanks,
Brad


flex -oConfiguration.cpp Configuration.l
CC -c -I/usr/local/include -g Configuration.cpp > Configuration.o
"/usr/local/include/FlexLexer.h", line 64: Error: The name istream is
ambiguous, istream and std::istream.
"/usr/local/include/FlexLexer.h", line 66: Error: The name istream is
ambiguous, istream and std::istream.
"/usr/local/include/FlexLexer.h", line 71: Error: The name istream is
ambiguous, istream and std::istream.
"/usr/local/include/FlexLexer.h", line 79: Error: The name istream is
ambiguous, istream and std::istream.
"/usr/local/include/FlexLexer.h", line 107: Error: The name istream is
ambiguous, istream and std::istream.
"/usr/local/include/FlexLexer.h", line 112: Error: The name istream is
ambiguous , istream and std::istream.
"/usr/local/include/FlexLexer.h", line 114: Error: The name istream is
ambiguous, istream and std::istream.
"/usr/local/include/FlexLexer.h", line 117: Error: The name istream is
ambiguous, istream and std::istream.
"/usr/local/include/FlexLexer.h", line 128: Error: The name istream is
ambiguous, istream and std::istream.
"/usr/local/include/FlexLexer.h", line 143: Error: The name istream is
ambiguous, istream and std::istream.
"Configuration.h", line 68: Warning: Configuration::yylex hides the virtual
function yyFlexLexer::yylex().
"Configuration.cpp", line 532: Error: Cannot assign std::basic_istream<char,
std::char_traits<char>>* to istream*.
"Configuration.cpp", line 857: Error: Could not find a match for
yyFlexLexer::yyFlexLexer(std::basic_istream<char, std::char_traits<char>>*,
std::basic_ostream<char, std::char_traits<char>>*).
"Configuration.cpp", line 858: Error: Cannot assign std::basic_istream<char,
std::char_traits<char>>* to istream*.
"Configuration.cpp", line 892: Error:
"yyFlexLexer::switch_streams(std::basic_istream<char,
std::char_traits<char>>*, std::basic_ostream<char,
std::char_traits<char>>*)" was previously declared
"yyFlexLexer::switch_streams(istream*, std::basic_ostream<char,
std::char_traits<char>>*)".
"Configuration.cpp", line 896: Error: Formal argument s of type istream* in
call to yyFlexLexer::yy_create_buffer(istream*, int) is being passed
std::basic_istream<char, std::char_traits<char>>*.
"Configuration.cpp", line 909: Error: The type "istream" is incomplete.
"Configuration.cpp", line 909: Error: The type "istream" is incomplete.
"Configuration.cpp", line 913: Error: The type "istream" is incomplete.
"Configuration.cpp", line 915: Error: The type "istream" is incomplete.
"Configuration.cpp", line 918: Error: The type "istream" is incomplete.
"Configuration.cpp", line 1241: Error:
"yyFlexLexer::yyrestart(std::basic_istream<char, std::char_traits<char>>*)"
was previously declared "yyFlexLexer::yyrestart(istream*)".
"Configuration.cpp", line 1245: Error: Formal argument s of type istream* in
call to yyFlexLexer::yy_init_buffer(yy_buffer_state*, istream*) is being
passed std::basic_istream<char, std::char_traits<char>>*.
"Configuration.cpp", line 1285: Error:
"yyFlexLexer::yy_create_buffer(std::basic_istream<char,
std::char_traits<char>>*, int)" was previously declared
"yyFlexLexer::yy_create_buffer(istream*, int)".
"Configuration.cpp", line 1303: Error: Formal argument s of type istream* in
call to yyFlexLexer::yy_init_buffer(yy_buffer_state*, istream*) is being
passed std::basic_istream<char, std::char_traits<char>>*.
"Configuration.cpp", line 1327: Error:
"yyFlexLexer::yy_init_buffer(yy_buffer_state*, std::basic_istream<char,
std::char_traits<char>>*)" was previously declared
"yyFlexLexer::yy_init_buffer(yy_buffer_state*, istream*)".
Compilation aborted, too many Error messages.
make: *** [Configuration.o] Error 1



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.