You are not logged in.
Pages: 1
I just installed Clang and it doesn't have the c++ libraries founded yet.
These are the directions I have to fix it but I have no idea where it's located.
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.
Any help would be appreciated.
Last edited by 6msj (2012-02-14 02:58:09)
Offline
There are likely candidates such as /usr/lib/ but really why not just ask pacman
pacman -Ql clang | grep InitHeaderSearch.cpp
Last edited by Trilby (2012-02-13 12:03:32)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks for replying Trilby; I don't get a return back when I enter that command.
Offline
Oops, sorry, I typed to quickly.
As it is referring to a cpp source file you won't likely have that file. You may have to patch and recompile clang or llvm yourself, unless someone has already put such a patch in the AUR.
As I don't use clang I should probably leave this to those who do.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Hmnn, looks like I'll have to wait for a Clang expert to comment on this. Meanwhile I'll just do a little more reading to see if I can solve it. Thanks.
Offline
Offline
I ran clang name.cpp.
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function __cxx_global_var_init: error: undefined reference to 'std::ios_base::Init::Init()'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function __cxx_global_var_init: error: undefined reference to 'std::ios_base::Init::~Init()'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function main: error: undefined reference to 'std::cout'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function main: error: undefined reference to 'std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function main: error: undefined reference to 'std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function main: error: undefined reference to 'std::ostream::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function main: error: undefined reference to 'std::cout'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function main: error: undefined reference to 'std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function main: error: undefined reference to 'std::cin'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function main: error: undefined reference to 'std::istream::operator>>(int&)'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function main: error: undefined reference to 'std::cout'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function main: error: undefined reference to 'std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function main: error: undefined reference to 'std::ostream::operator<<(std::ostream& (*)(std::ostream&))'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function pushingToArray(int*, int&): error: undefined reference to 'std::cout'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function pushingToArray(int*, int&): error: undefined reference to 'std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function pushingToArray(int*, int&): error: undefined reference to 'std::cin'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function pushingToArray(int*, int&): error: undefined reference to 'std::istream::operator>>(int&)'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function checkingTheArray(int*, int&): error: undefined reference to 'std::ostream::operator<<(int)'
/tmp/BubbleSort-x5Dawr.o:BubbleSort.cpp:function checkingTheArray(int*, int&): error: undefined reference to 'std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Offline
Thanks! Dumb mistake.
Offline
Pages: 1