I'm trying to compile a code snippet that uses llvm as c++ library but I'm getting errors such as the compiler could not find header files.
The compiler commands I used are:
clang++ file.cpp -o reader `llvm-config --cxxflags --libs --ldflags --system-libs`
and
clang++ file.cpp -o reader `llvm-config --cxxflags --libs --ldflags --system-libs` -v -fno-exceptions
I've also tried to specify the include directory:
clang++ parser.cpp -o reader `llvm-config --cxxflags --libs --ldflags --system-libs` -v -fno-exceptions -I$(llvm-config –includedir)
and with specifying manually the path to the lib. However, nothing was successful. It seems that I should install llvm as library apart from it being installed as a tool - but I can't find any reasonable description on how to do it.
If I'm right and it should be somehow installed, I would appreciate your help for explaining how to do that. If it shouldn't and you can see any other issue that is preventing me from compiling the code, I would appreciate your help in that. Thanks in advance!