[cfe-dev] Clang++ error
Devchandra L Meetei
dlmeetei at gmail.com
Fri Mar 11 06:32:19 PST 2011
HI All
I downloaded binary versions of clang with llvm.
When trying to compile hello world program(c++) with clang++ under linux, I
got many errors.
Seem to me that it is due to some mis-configuration realeated to header
location.
Would somebody tell me. How to resolve this.
Thnaks in advance
dev
[deleisha at delmeetei bin]$
[deleisha at delmeetei bin]$ clang++ heloo.cpp
In file included from heloo.cpp:1:
In file included from /usr/include/c++/4.4.4/iostream:39:
In file included from /usr/include/c++/4.4.4/ostream:39:
In file included from /usr/include/c++/4.4.4/ios:38:
In file included from /usr/include/c++/4.4.4/iosfwd:40:
/usr/include/c++/4.4.4/bits/stringfwd.h:41:1: error: C++ requires a type
specifier for all declarations
_GLIBCXX_BEGIN_NAMESPACE(std)
^
/usr/include/c++/4.4.4/bits/stringfwd.h:41:26: error: use of undeclared
identifier 'std'
_GLIBCXX_BEGIN_NAMESPACE(std)
^
/usr/include/c++/4.4.4/bits/stringfwd.h:41:30: error: expected ';' after top
level declarator
_GLIBCXX_BEGIN_NAMESPACE(std)
^
;
/usr/include/c++/4.4.4/bits/stringfwd.h:50:30: error: unknown type name
'allocator'
typename _Alloc = allocator<_CharT> >
^
/usr/include/c++/4.4.4/bits/stringfwd.h:50:46: error: expected
unqualified-id
typename _Alloc = allocator<_CharT> >
^
/usr/include/c++/4.4.4/bits/stringfwd.h:55:11: error: unknown type name
'basic_string'
typedef basic_string<char> string;
^
/usr/include/c++/4.4.4/bits/stringfwd.h:55:23: error: expected
unqualified-id
typedef basic_string<char> string;
^
/usr/include/c++/4.4.4/bits/stringfwd.h:60:11: error: unknown type name
'basic_string'
typedef basic_string<wchar_t> wstring;
^
/usr/include/c++/4.4.4/bits/stringfwd.h:60:23: error: expected
unqualified-id
typedef basic_string<wchar_t> wstring;
^
/usr/include/c++/4.4.4/bits/stringfwd.h:74:1: error: unknown type name
'_GLIBCXX_END_NAMESPACE'
_GLIBCXX_END_NAMESPACE
^
In file included from heloo.cpp:1:
In file included from /usr/include/c++/4.4.4/iostream:39:
In file included from /usr/include/c++/4.4.4/ostream:39:
In file included from /usr/include/c++/4.4.4/ios:38:
In file included from /usr/include/c++/4.4.4/iosfwd:41:
In file included from /usr/include/c++/4.4.4/bits/postypes.h:41:
In file included from /usr/include/c++/4.4.4/cwchar:43:
In file included from /usr/include/c++/4.4.4/cstddef:43:
/usr/local/lib/clang/2.8/include/stddef.h:29:1: error: expected
unqualified-id
typedef __typeof__(((int*)0)-((int*)0)) ptrdiff_t;
^
In file included from heloo.cpp:1:
In file included from /usr/include/c++/4.4.4/iostream:39:
In file included from /usr/include/c++/4.4.4/ostream:39:
In file included from /usr/include/c++/4.4.4/ios:38:
In file included from /usr/include/c++/4.4.4/iosfwd:41:
In file included from /usr/include/c++/4.4.4/bits/postypes.h:41:
In file included from /usr/include/c++/4.4.4/cwchar:43:
/usr/include/c++/4.4.4/cstddef:48:1: error: C++ requires a type specifier
for all declarations
_GLIBCXX_BEGIN_NAMESPACE(std)
^
/usr/include/c++/4.4.4/cstddef:48:26: error: use of undeclared identifier
'std'
_GLIBCXX_BEGIN_NAMESPACE(std)
^
/usr/include/c++/4.4.4/cstddef:48:30: error: expected ';' after top level
declarator
_GLIBCXX_BEGIN_NAMESPACE(std)
^
;
/usr/include/c++/4.4.4/cstddef:53:1: error: unknown type name
'_GLIBCXX_END_NAMESPACE'
_GLIBCXX_END_NAMESPACE
^
In file included from heloo.cpp:1:
In file included from /usr/include/c++/4.4.4/iostream:39:
In file included from /usr/include/c++/4.4.4/ostream:39:
In file included from /usr/include/c++/4.4.4/ios:38:
In file included from /usr/include/c++/4.4.4/iosfwd:41:
In file included from /usr/include/c++/4.4.4/bits/postypes.h:41:
In file included from /usr/include/c++/4.4.4/cwchar:46:
In file included from /usr/include/wchar.h:37:
/usr/include/stdio.h:46:1: error: expected unqualified-id
typedef struct _IO_FILE FILE;
^
In file included from heloo.cpp:1:
In file included from /usr/include/c++/4.4.4/iostream:39:
In file included from /usr/include/c++/4.4.4/ostream:39:
In file included from /usr/include/c++/4.4.4/ios:38:
In file included from /usr/include/c++/4.4.4/iosfwd:41:
In file included from /usr/include/c++/4.4.4/bits/postypes.h:41:
/usr/include/c++/4.4.4/cwchar:64:1: error: C++ requires a type specifier for
all declarations
_GLIBCXX_BEGIN_NAMESPACE(std)
^
/usr/include/c++/4.4.4/cwchar:64:26: error: use of undeclared identifier
'std'
_GLIBCXX_BEGIN_NAMESPACE(std)
^
/usr/include/c++/4.4.4/cwchar:64:30: error: expected ';' after top level
declarator
_GLIBCXX_BEGIN_NAMESPACE(std)
^
;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[deleisha at delmeetei bin]$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110311/7f0c613b/attachment.html>
More information about the cfe-dev
mailing list