Hi,
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
#include <math.h>
#include <pthread.h>
#include <sys/time.h>
#include <unistd.h>
#include <stdlib.h>
#include <malloc.h>
#include <sched.h>
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.cpp
and 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: