I am trying to compile a program in C ++ using clang, which I installed using the packaged version here https://launchpad.net/~eudoxos/+archive/llvm-3.1 . This is the command:
clang++ -std=c++11 -stdlib=libc++ -g -v -c main.cpp
And I get this as a result:
ignoring nonexistent directory "/usr/include/c++/v1" ignoring nonexistent directory "/usr/bin/../lib/clang/3.1/include" ignoring nonexistent directory "" ignoring duplicate directory "/usr/include/x86_64-linux-gnu" #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/include/clang/3.1/include /usr/include/x86_64-linux-gnu /usr/include main.cpp:1:10: fatal error: 'iostream' file not found #include <iostream>
As you can see, this is not a search in the correct include directory, / usr / include / c ++ / 4.6. But I think the problem is deeper. Even when I force it to search in this directory, I get the following:
In file included from main.cpp:1: /usr/include/c++/4.6/iostream:38:10: fatal error: 'bits/c++config.h' file not found
And this file does not exist in this area. I think it is possible that libC ++ is missing, but before I make a huge mess trying to compile libC ++ from the source (which I doubt will work), since I cannot find any libC ++ ubuntu highlighted package I was hoping you guys could help.
Many thanks!
ubuntu clang libc ++
Danb91
source share