Required libantlr4-runtime-devel as dependencies so install it with sudo zypper in libantlr4-runtime-devel.
Change directory to blackbird_cpp folder.
cmake .
sudo make install
Error as shown below.
Scanning dependencies of target blackbird
20%] Building CXX object CMakeFiles/blackbird.dir/Visitor.cpp.o
In file included from /usr/include/antlr4-runtime/CharStream.h:9,
from /usr/include/antlr4-runtime/ANTLRInputStream.h:8,
from /usr/include/antlr4-runtime/ANTLRFileStream.h:8,
from /usr/include/antlr4-runtime/antlr4-runtime.h:14,
from /home/kev/Desktop/quantum-blackbird-0.2.4/blackbird_cpp/Blackbird.h:23,
from /home/kev/Desktop/quantum-blackbird-0.2.4/blackbird_cpp/Visitor.cpp:16:
/usr/include/antlr4-runtime/misc/Interval.h:8:10: fatal error: antlr4-common.h: No such file or directory
8 | #include "antlr4-common.h"
| ^~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/blackbird.dir/build.make:82: CMakeFiles/blackbird.dir/Visitor.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/blackbird.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
It complain about fatal error: antlr4-common.h: No such file or directory, but antlr4-common.h should be provided by libantlr4-runtime-devel. SO what is going on here?
Thank you
If this file is not in one of default include directories you either need to specify correct include directory during compilation (-I…) or patch sources to use path relative to one of standard include directories.
Hi
The -I is the way to (-I)nclude a directory, look in the CmakeList.txt and look for the includes and add (don’t change) so it gets appended to the includes.
But I encounter other error instead, I got a lot of this, not sure what it meant.
/home/abuild/rpmbuild/BUILD/quantum-blackbird-0.2.4/blackbird_cpp/Visitor.cpp:262:5: error: control reaches end of non-void function -Werror=return-type]
Hi
You need to look at the code at Visitor.cpp line 262 and fix the return to actually mean something, depends on what it’s expecting… looks like it gets to the end, all the previous are return val; but no return if it doesn’t return val… what is it passing through at that point?