Ho il seguente file foo.cpp
:clang -cc1 e sistema include
#include <vector>
struct MyClass
{
std::vector<int> v;
};
Si può essere compilato con successo con clang (sto usando clangore 3.3 su Ubuntu 13.04 a 32 bit):
clang++ -c foo.cpp
ora voglio stampare AST:
clang++ -cc1 -ast-print foo.cpp
e ho ottenuto il seguente errore
foo.cpp:1:10: fatal error: 'vector' file not found
#include <vector>
^
struct MyClass {
};
1 error generated.
Sembra clang++ -cc1
non sapere di sistema includono file, ecc Mi chiedo come impostare include per clang++ -cc1
?
Prova anche a cambiare "-stdlib = libstdC++" in "-lstdC++", ad esempio "clang -x C++ -std = C++ 11 -lstdC++ -Wall input.cpp -o output" – robor78