I am new to linux, llvm and clang, so please excuse me if I ask some basic level questions.
I have some c code with code like below, so it won’t compile with clang
I think that I need to do the following from the website:
If you intend to work on Clang C++ support, you may need to tell it how to find your C++ standard library headers. If Clang cannot find your system libstdc++ headers, please follow these instructions:
gcc -v -x c++ /dev/null -fsyntax-only’ to get the path.
- Look for the comment “FIXME: temporary hack: hard-coded paths” in
clang/lib/Frontend/InitHeaderSearch.cppand change the lines below to include that path.
After I run ‘
gcc -v -x c++ /dev/null -fsyntax-only’ at the terminal, the following error came up: