Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
‘yylex’ was not declared in this scope #1
Comments
|
Hey, you got me curious. |
|
Btw, please check if your yacc is not a link to bison.
I reproduced the issue with bison, so i need change the code a little for
it, but yacc works perfectly.
…On 1 November 2017 at 02:14, EXL ***@***.***> wrote:
I can't compile your modern qt2 library.
Thist errors occurs on GCC 5.4.0, Flex 2.6.0 and GCC 7.2.0 and Flex 2.6.4:
$ make -j1
/usr/bin/cmake -H/home/baat/magx/qt2 -B/home/baat/magx/qt2/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/baat/magx/qt2/build/CMakeFiles /home/baat/magx/qt2/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: вход в каталог «/home/baat/magx/qt2/build»
make -f src/moc/CMakeFiles/moc-qt2.dir/build.make src/moc/CMakeFiles/moc-qt2.dir/depend
make[2]: вход в каталог «/home/baat/magx/qt2/build»
[ 0%] Generating lex.yy.c
cd /home/baat/magx/qt2/build/src/moc && flex -o lex.yy.c /home/baat/magx/qt2/src/moc/moc.l
[ 0%] Generating mocgen.cpp
cd /home/baat/magx/qt2/build/src/moc && yacc -d -o mocgen.cpp /home/baat/magx/qt2/src/moc/moc.y
cd /home/baat/magx/qt2/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/baat/magx/qt2 /home/baat/magx/qt2/src/moc /home/baat/magx/qt2/build /home/baat/magx/qt2/build/src/moc /home/baat/magx/qt2/build/src/moc/CMakeFiles/moc-qt2.dir/DependInfo.cmake --color=
Scanning dependencies of target moc-qt2
make[2]: выход из каталога «/home/baat/magx/qt2/build»
make -f src/moc/CMakeFiles/moc-qt2.dir/build.make src/moc/CMakeFiles/moc-qt2.dir/build
make[2]: вход в каталог «/home/baat/magx/qt2/build»
[ 0%] Building CXX object src/moc/CMakeFiles/moc-qt2.dir/mocgen.cpp.o
cd /home/baat/magx/qt2/build/src/moc && /usr/bin/c++ -DQT_LITE_UNICODE -DQT_NO_CODECS -I/home/baat/magx/qt2/build/src/moc -I/home/baat/magx/qt2/src/moc -I/home/baat/magx/qt2/include -I/home/baat/magx/qt2/src/tools -Wno-format-security -o CMakeFiles/moc-qt2.dir/mocgen.cpp.o -c /home/baat/magx/qt2/build/src/moc/mocgen.cpp
mocgen.cpp: In function ‘int yyparse()’:
mocgen.cpp:1925:23: error: ‘yylex’ was not declared in this scope
yychar = yylex ();
^
/home/baat/magx/qt2/src/moc/moc.y:443:39: error: ‘enterNameSpace’ was not declared in this scope
IDENTIFIER { enterNameSpace($2); }
^
/home/baat/magx/qt2/src/moc/moc.y:444:7: error: ‘BEGIN’ was not declared in this scope
'{' { BEGIN IN_NAMESPACE; }
^
/home/baat/magx/qt2/src/moc/moc.y:446:22: error: ‘leaveNameSpace’ was not declared in this scope
'}' { leaveNameSpace();
^
/home/baat/magx/qt2/src/moc/moc.y:447:51: error: ‘selectOutsideClassState’ was not declared in this scope
selectOutsideClassState();
^
...
Any suggestions? Thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAZhgA2srwq1RIh3ED3fo_gJIK8-lgpvks5sx8XvgaJpZM4QNn67>
.
|
Ubuntu 16.04.3 LTS.
Apparently all popular distributions use a symlink yacc => bison? I found this information, maybe it will come in handy. |
|
Yep, i already onto that, but i guess will not be that simple.
Tomorrow i change the code and fix your issue.
Thanks for report it.
…On 1 November 2017 at 22:10, EXL ***@***.***> wrote:
Which distro are you using with gcc 5.4 ?
Ubuntu 16.04.3 LTS.
I reproduced the issue with bison, so i need change the code a little for
it, but yacc works perfectly.
Apparently all popular distributions use a symlink yacc => bison? I found
this information, maybe it will come in handy.
https://www.di-mgt.com.au/converting_from_lex_and_yacc.html
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAZhgMNJ8ImHXByW1Lix7gtNK40ruiVuks5syN5ZgaJpZM4QNn67>
.
|
|
@heliocastro I did not find classic But I found a utility like Berkeley Yacc, and install this package, which available in Ubuntu, Debian and Arch Linux. Then I changed the line #40 from Maybe it will help someone. Cheers! |
|
I hit the same issue with GCC 7.2.1 and bison 3.0.4 (which is symlinked to /usr/bin/yacc) |
|
Guys, happy new year and I'm travelling to celebrate the passage, but I promise see everything when I'm back. And yes, still need byacc, I didn't have time to proper port to modern business. |
|
Fixed now using byacc detection and new compilation method. |
|
Compiles fine for me now! |
|
Hi There's a issue as Qt2 didn't recognize ARGB visuals on those times ( of course ! ), so thanks to Gustavo Boiko that found the issue. So, if you do intend to run software like Qt designer, export this on command line: XLIB_SKIP_ARGB_VISUALS=1 |
I can't compile your modern qt2 library.
This errors occurs on GCC 5.4.0, Flex 2.6.0 and GCC 7.2.0 and Flex 2.6.4:
Any suggestions? Thanks!