HI All<br>I downloaded binary versions of clang with llvm.<br>When trying to compile hello world program(c++) with clang++ under linux, I got many errors.<br><br>Seem to me  that it is due to some mis-configuration realeated to header location.<br>
<br>Would somebody tell me. How to resolve this.<br><br>Thnaks in advance<br>dev<br><br>[deleisha@delmeetei bin]$<br>[deleisha@delmeetei bin]$ clang++ heloo.cpp<br>In file included from heloo.cpp:1:<br>In file included from /usr/include/c++/4.4.4/iostream:39:<br>
In file included from /usr/include/c++/4.4.4/ostream:39:<br>In file included from /usr/include/c++/4.4.4/ios:38:<br>In file included from /usr/include/c++/4.4.4/iosfwd:40:<br>/usr/include/c++/4.4.4/bits/stringfwd.h:41:1: error: C++ requires a type specifier for all declarations<br>
_GLIBCXX_BEGIN_NAMESPACE(std)<br>^<br>/usr/include/c++/4.4.4/bits/stringfwd.h:41:26: error: use of undeclared identifier 'std'<br>_GLIBCXX_BEGIN_NAMESPACE(std)<br>                         ^<br>/usr/include/c++/4.4.4/bits/stringfwd.h:41:30: error: expected ';' after top level declarator<br>
_GLIBCXX_BEGIN_NAMESPACE(std)<br>                             ^<br>                             ;<br>/usr/include/c++/4.4.4/bits/stringfwd.h:50:30: error: unknown type name 'allocator'<br>           typename _Alloc = allocator<_CharT> ><br>
                             ^<br>/usr/include/c++/4.4.4/bits/stringfwd.h:50:46: error: expected unqualified-id<br>           typename _Alloc = allocator<_CharT> ><br>                                             ^<br>
/usr/include/c++/4.4.4/bits/stringfwd.h:55:11: error: unknown type name 'basic_string'<br>  typedef basic_string<char>    string;<br>          ^<br>/usr/include/c++/4.4.4/bits/stringfwd.h:55:23: error: expected unqualified-id<br>
  typedef basic_string<char>    string;<br>                      ^<br>/usr/include/c++/4.4.4/bits/stringfwd.h:60:11: error: unknown type name 'basic_string'<br>  typedef basic_string<wchar_t> wstring;<br>
          ^<br>/usr/include/c++/4.4.4/bits/stringfwd.h:60:23: error: expected unqualified-id<br>  typedef basic_string<wchar_t> wstring;<br>                      ^<br>/usr/include/c++/4.4.4/bits/stringfwd.h:74:1: error: unknown type name '_GLIBCXX_END_NAMESPACE'<br>
_GLIBCXX_END_NAMESPACE<br>^<br>In file included from heloo.cpp:1:<br>In file included from /usr/include/c++/4.4.4/iostream:39:<br>In file included from /usr/include/c++/4.4.4/ostream:39:<br>In file included from /usr/include/c++/4.4.4/ios:38:<br>
In file included from /usr/include/c++/4.4.4/iosfwd:41:<br>In file included from /usr/include/c++/4.4.4/bits/postypes.h:41:<br>In file included from /usr/include/c++/4.4.4/cwchar:43:<br>In file included from /usr/include/c++/4.4.4/cstddef:43:<br>
/usr/local/lib/clang/2.8/include/stddef.h:29:1: error: expected unqualified-id<br>typedef __typeof__(((int*)0)-((int*)0)) ptrdiff_t;<br>^<br>In file included from heloo.cpp:1:<br>In file included from /usr/include/c++/4.4.4/iostream:39:<br>
In file included from /usr/include/c++/4.4.4/ostream:39:<br>In file included from /usr/include/c++/4.4.4/ios:38:<br>In file included from /usr/include/c++/4.4.4/iosfwd:41:<br>In file included from /usr/include/c++/4.4.4/bits/postypes.h:41:<br>
In file included from /usr/include/c++/4.4.4/cwchar:43:<br>/usr/include/c++/4.4.4/cstddef:48:1: error: C++ requires a type specifier for all declarations<br>_GLIBCXX_BEGIN_NAMESPACE(std)<br>^<br>/usr/include/c++/4.4.4/cstddef:48:26: error: use of undeclared identifier 'std'<br>
_GLIBCXX_BEGIN_NAMESPACE(std)<br>                         ^<br>/usr/include/c++/4.4.4/cstddef:48:30: error: expected ';' after top level declarator<br>_GLIBCXX_BEGIN_NAMESPACE(std)<br>                             ^<br>
                             ;<br>/usr/include/c++/4.4.4/cstddef:53:1: error: unknown type name '_GLIBCXX_END_NAMESPACE'<br>_GLIBCXX_END_NAMESPACE<br>^<br>In file included from heloo.cpp:1:<br>In file included from /usr/include/c++/4.4.4/iostream:39:<br>
In file included from /usr/include/c++/4.4.4/ostream:39:<br>In file included from /usr/include/c++/4.4.4/ios:38:<br>In file included from /usr/include/c++/4.4.4/iosfwd:41:<br>In file included from /usr/include/c++/4.4.4/bits/postypes.h:41:<br>
In file included from /usr/include/c++/4.4.4/cwchar:46:<br>In file included from /usr/include/wchar.h:37:<br>/usr/include/stdio.h:46:1: error: expected unqualified-id<br>typedef struct _IO_FILE FILE;<br>^<br>In file included from heloo.cpp:1:<br>
In file included from /usr/include/c++/4.4.4/iostream:39:<br>In file included from /usr/include/c++/4.4.4/ostream:39:<br>In file included from /usr/include/c++/4.4.4/ios:38:<br>In file included from /usr/include/c++/4.4.4/iosfwd:41:<br>
In file included from /usr/include/c++/4.4.4/bits/postypes.h:41:<br>/usr/include/c++/4.4.4/cwchar:64:1: error: C++ requires a type specifier for all declarations<br>_GLIBCXX_BEGIN_NAMESPACE(std)<br>^<br>/usr/include/c++/4.4.4/cwchar:64:26: error: use of undeclared identifier 'std'<br>
_GLIBCXX_BEGIN_NAMESPACE(std)<br>                         ^<br>/usr/include/c++/4.4.4/cwchar:64:30: error: expected ';' after top level declarator<br>_GLIBCXX_BEGIN_NAMESPACE(std)<br>                             ^<br>
                             ;<br>fatal error: too many errors emitted, stopping now [-ferror-limit=]<br>20 errors generated.<br>[deleisha@delmeetei bin]$         <br>