Hi All,
I tried the LibTooling example, and when I compile I got error like this :
[root@localhost Clang-tutorial-master]# sudo make
clang++ -I/home/krishan/llvm/tools/clang/include -I/home/krishan/buildllvm/tools/clang/include -I/home/krishan/llvm/include -I/home/krishan/buildllvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3 -fomit-frame-pointer -std=c++11 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fPIC -Woverloaded-virtual -ffunction-sections -fdata-sections -Wcast-qual -fno-rtti -c -o tutorial1.o tutorial1.cpp
In file included from tutorial1.cpp:4:
In file included from /home/krishan/llvm/include/llvm/Support/raw_ostream.h:17:
/home/krishan/llvm/include/llvm/ADT/StringRef.h:13:10: fatal error: ‘algorithm’ file not found
#include
^
1 error generated.
make: *** [tutorial1.o] Error 1
[root@localhost Clang-tutorial-master]#
Please help me on this, and give me some solution…
Thank-you
Krish
Hi Krish
Hi All,
I tried the LibTooling example, and when I compile I got error like this :
[root@localhost Clang-tutorial-master]# sudo make
1. You shouldn't build stuff as root.
2. If you are root, why are you using sudo ?
clang++ -I/home/krishan/llvm/tools/clang/include
-I/home/krishan/buildllvm/tools/clang/include -I/home/krishan/llvm/include
-I/home/krishan/buildllvm/include -D_DEBUG -D_GNU_SOURCE
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3
-fomit-frame-pointer -std=c++11 -fvisibility-inlines-hidden -fno-exceptions
-fno-rtti -fPIC -Woverloaded-virtual -ffunction-sections -fdata-sections
-Wcast-qual -fno-rtti -c -o tutorial1.o tutorial1.cpp
In file included from tutorial1.cpp:4:
In file included from
/home/krishan/llvm/include/llvm/Support/raw_ostream.h:17:
/home/krishan/llvm/include/llvm/ADT/StringRef.h:13:10: fatal error:
'algorithm' file not found
#include <algorithm>
^
1 error generated.
make: *** [tutorial1.o] Error 1
What operating system are you using?
If it's Linux, which distribution is it?
Where is clang++? Did you install a package or did you build it
yourself? If you built it yourself, did you run 'make install'
afterwards?
Run the compiler command from above but add the -v switch, like this:
clang++ -v -I/home/krishan/llvm/tools/clang/include
-I/home/krishan/buildllvm/tools/clang/include
-I/home/krishan/llvm/include -I/home/krishan/buildllvm/include
-D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS -O3 -fomit-frame-pointer -std=c++11
-fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fPIC
-Woverloaded-virtual -ffunction-sections -fdata-sections -Wcast-qual
-fno-rtti -c -o tutorial1.o tutorial1.cpp
and show us the output.
Csaba