0

I am relatively new to Linux and Clang, and I am having trouble getting the Clang 3.4 toolchain to correctly determine where the libstdc++ libraries are. I am running Mint 17, have Clang-3.4 installed and have GCC 4.8 installed as well. Using the verbose flag, the output looks like:

#include "..." search starts here:
#include <...> search starts here:
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++
/usr/local/include
/usr/bin/../lib/clang/3.4/include
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/include
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
test.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>

The search stops one subfolder shy of where it looks like all the libstdc++ headers live (in /c++/4.8). I have used the package manager to uninstall and reinstall gcc, clang, llvm and all dependencies. I have also tried reinstalling using the cli using apt-get.

A majority of the answers I've seen for this question revolve around changing the /FrontEnd/InitHeaderSearch.cpp file to look in the correct place for the libstdc++ stuff, but this doesn't exist on my machine. Rather, locate -b InitHeaderSearchdoes not find any results.

Aside from building clang and llvm from source, how else can I change where clang is looking for the libraries?

Thank you.

thamill
  • 1
  • 2
  • Hmm. Perhaps a symlink workaround? Compiling g++/clang isn't impossible, but it isn't trivial either. – Cameron Dec 02 '14 at 23:02
  • I suppose that I could make a symlink to every file in the child directory, but that seems even more hacky than adding another -I flag to the correct directory. – thamill Dec 02 '14 at 23:11

0 Answers0