[cfe-dev] get clang to use gcc headers instead of Visual Studio headers
Nathan Ridge
zeratul976 at hotmail.com
Tue May 25 19:50:52 PDT 2010
Hi Doug,
>> That worked, but now when I try to compile a test file that simply
>> includes , I get the following errors:
>>
>> [snip]
>
> Probably nothing. It's likely that there is a configuration issue with
> Clang on mingw, since very, very few people have tried to make this
> configuration work.
All right, so I tried compiling a test file that includes < string>
using the default Visual Studio headers. I'm assuming that
clang and Visual Studio headers *is* a common configuration (if not,
then what is?), so what am I doing wrong this time?
Here are the errors:
In file included from test.cpp:1:
In file included from c:\Dev\Programs\MSVS\VC\include/string:6:
In file included from c:\Dev\Programs\MSVS\VC\include/istream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ostream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ios:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocnum:9:
In file included from c:\Dev\Programs\MSVS\VC\include/streambuf:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xiosbase:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocale:8:
In file included from c:\Dev\Programs\MSVS\VC\include/stdexcept:6:
In file included from c:\Dev\Programs\MSVS\VC\include/exception:40:
c:\Dev\Programs\MSVS\VC\include/eh.h(61) : error: unknown type name 'type_info'
_CRTIMP int __cdecl _is_exception_typeof(_In_ const type_info &_Type, _In_ struct ...
^
In file included from test.cpp:1:
In file included from c:\Dev\Programs\MSVS\VC\include/string:6:
In file included from c:\Dev\Programs\MSVS\VC\include/istream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ostream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ios:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocnum:9:
In file included from c:\Dev\Programs\MSVS\VC\include/streambuf:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xiosbase:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocale:8:
In file included from c:\Dev\Programs\MSVS\VC\include/stdexcept:7:
In file included from c:\Dev\Programs\MSVS\VC\include/xstring:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xmemory:8:
c:\Dev\Programs\MSVS\VC\include/new(53) : error: exception specification in declaration does not
match previous declaration
_Ret_bytecap_(_Size) void *__CRTDECL operator new(size_t _Size) _THROW1(std::bad_alloc);
^
note: previous declaration is here
c:\Dev\Programs\MSVS\VC\include/new(81) : error: exception specification in declaration does not
match previous declaration
_Ret_bytecap_(_Size) void *__CRTDECL operator new[](size_t _Size)
^
note: previous declaration is here
In file included from test.cpp:1:
In file included from c:\Dev\Programs\MSVS\VC\include/string:6:
In file included from c:\Dev\Programs\MSVS\VC\include/istream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ostream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ios:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocnum:9:
In file included from c:\Dev\Programs\MSVS\VC\include/streambuf:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xiosbase:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocale:8:
In file included from c:\Dev\Programs\MSVS\VC\include/stdexcept:7:
In file included from c:\Dev\Programs\MSVS\VC\include/xstring:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xmemory:9:
In file included from c:\Dev\Programs\MSVS\VC\include/xutility:7:
In file included from c:\Dev\Programs\MSVS\VC\include/utility:6:
In file included from c:\Dev\Programs\MSVS\VC\include/iosfwd:8:
In file included from c:\Dev\Programs\MSVS\VC\include/cwchar:13:
c:\Dev\Programs\MSVS\VC\include/wchar.h(1209) : error: expected expression
{return (_P == NULL || *_P == 0); }
^
In file included from test.cpp:1:
In file included from c:\Dev\Programs\MSVS\VC\include/string:6:
In file included from c:\Dev\Programs\MSVS\VC\include/istream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ostream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ios:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocnum:9:
In file included from c:\Dev\Programs\MSVS\VC\include/streambuf:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xiosbase:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocale:8:
In file included from c:\Dev\Programs\MSVS\VC\include/stdexcept:7:
In file included from c:\Dev\Programs\MSVS\VC\include/xstring:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xmemory:9:
In file included from c:\Dev\Programs\MSVS\VC\include/xutility:7:
In file included from c:\Dev\Programs\MSVS\VC\include/utility:6:
c:\Dev\Programs\MSVS\VC\include/iosfwd(219) : error: no member named '_invalid_parameter_noinfo' in
the global namespace; did you mean '_invalid_parameter_handler'?
_SCL_SECURE_CRT_VALIDATE(_Dest_size>= _Count, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from test.cpp:1:
In file included from c:\Dev\Programs\MSVS\VC\include/string:6:
In file included from c:\Dev\Programs\MSVS\VC\include/istream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ostream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ios:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocnum:6:
In file included from c:\Dev\Programs\MSVS\VC\include/climits:5:
c:\Dev\Programs\MSVS\VC\include/yvals.h:226:4: note: instantiated from:
_SCL_SECURE_INVALID_PARAMETER(cond); \
^
c:\Dev\Programs\MSVS\VC\include/yvals.h:183:47: note: instantiated from:
#define _SCL_SECURE_INVALID_PARAMETER(expr) ::_invalid_parameter_noinfo()
~~^
In file included from test.cpp:1:
In file included from c:\Dev\Programs\MSVS\VC\include/string:6:
In file included from c:\Dev\Programs\MSVS\VC\include/istream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ostream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ios:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocnum:9:
In file included from c:\Dev\Programs\MSVS\VC\include/streambuf:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xiosbase:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocale:8:
In file included from c:\Dev\Programs\MSVS\VC\include/stdexcept:7:
In file included from c:\Dev\Programs\MSVS\VC\include/xstring:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xmemory:9:
In file included from c:\Dev\Programs\MSVS\VC\include/xutility:7:
In file included from c:\Dev\Programs\MSVS\VC\include/utility:6:
c:\Dev\Programs\MSVS\VC\include/iosfwd(219) : error: expected expression
_SCL_SECURE_CRT_VALIDATE(_Dest_size>= _Count, NULL);
^
In file included from test.cpp:1:
In file included from c:\Dev\Programs\MSVS\VC\include/string:6:
In file included from c:\Dev\Programs\MSVS\VC\include/istream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ostream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ios:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocnum:6:
In file included from c:\Dev\Programs\MSVS\VC\include/climits:5:
c:\Dev\Programs\MSVS\VC\include/yvals.h:227:20: note: instantiated from:
return (retvalue); \
^
In file included from test.cpp:1:
In file included from c:\Dev\Programs\MSVS\VC\include/string:6:
In file included from c:\Dev\Programs\MSVS\VC\include/istream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ostream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ios:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocnum:9:
In file included from c:\Dev\Programs\MSVS\VC\include/streambuf:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xiosbase:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocale:8:
In file included from c:\Dev\Programs\MSVS\VC\include/stdexcept:7:
In file included from c:\Dev\Programs\MSVS\VC\include/xstring:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xmemory:9:
In file included from c:\Dev\Programs\MSVS\VC\include/xutility:7:
In file included from c:\Dev\Programs\MSVS\VC\include/utility:6:
c:\Dev\Programs\MSVS\VC\include/iosfwd(249) : error: no member named '_invalid_parameter_noinfo' in
the global namespace; did you mean '_invalid_parameter_handler'?
_SCL_SECURE_CRT_VALIDATE(_Dest_size>= _Count, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from test.cpp:1:
In file included from c:\Dev\Programs\MSVS\VC\include/string:6:
In file included from c:\Dev\Programs\MSVS\VC\include/istream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ostream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ios:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocnum:6:
In file included from c:\Dev\Programs\MSVS\VC\include/climits:5:
c:\Dev\Programs\MSVS\VC\include/yvals.h:226:4: note: instantiated from:
_SCL_SECURE_INVALID_PARAMETER(cond); \
^
c:\Dev\Programs\MSVS\VC\include/yvals.h:183:47: note: instantiated from:
#define _SCL_SECURE_INVALID_PARAMETER(expr) ::_invalid_parameter_noinfo()
~~^
In file included from test.cpp:1:
In file included from c:\Dev\Programs\MSVS\VC\include/string:6:
In file included from c:\Dev\Programs\MSVS\VC\include/istream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ostream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ios:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocnum:9:
In file included from c:\Dev\Programs\MSVS\VC\include/streambuf:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xiosbase:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocale:8:
In file included from c:\Dev\Programs\MSVS\VC\include/stdexcept:7:
In file included from c:\Dev\Programs\MSVS\VC\include/xstring:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xmemory:9:
In file included from c:\Dev\Programs\MSVS\VC\include/xutility:7:
In file included from c:\Dev\Programs\MSVS\VC\include/utility:6:
c:\Dev\Programs\MSVS\VC\include/iosfwd(249) : error: expected expression
_SCL_SECURE_CRT_VALIDATE(_Dest_size>= _Count, NULL);
^
In file included from test.cpp:1:
In file included from c:\Dev\Programs\MSVS\VC\include/string:6:
In file included from c:\Dev\Programs\MSVS\VC\include/istream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ostream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ios:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocnum:6:
In file included from c:\Dev\Programs\MSVS\VC\include/climits:5:
c:\Dev\Programs\MSVS\VC\include/yvals.h:227:20: note: instantiated from:
return (retvalue); \
^
In file included from test.cpp:1:
In file included from c:\Dev\Programs\MSVS\VC\include/string:6:
In file included from c:\Dev\Programs\MSVS\VC\include/istream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ostream:6:
In file included from c:\Dev\Programs\MSVS\VC\include/ios:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocnum:9:
In file included from c:\Dev\Programs\MSVS\VC\include/streambuf:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xiosbase:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xlocale:8:
In file included from c:\Dev\Programs\MSVS\VC\include/stdexcept:7:
In file included from c:\Dev\Programs\MSVS\VC\include/xstring:6:
In file included from c:\Dev\Programs\MSVS\VC\include/xmemory:9:
c:\Dev\Programs\MSVS\VC\include/xutility(995) : error: template argument for template type
parameter must be a type
iterator_traits<_Iter1>::iterator_category,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:\Dev\Programs\MSVS\VC\include/xutility(960) : note: template parameter is declared here
template<class _Cat1, class _Cat2>
^
c:\Dev\Programs\MSVS\VC\include/xutility(996) : error: expected a qualified name after 'typename'
iterator_traits<_Iter2>::iterator_category>::_Iter_random_cat _Cat;
^
c:\Dev\Programs\MSVS\VC\include/xutility(996) : error: no template named '_Iter_random_cat'; did
you mean '_Iter_random'?
iterator_traits<_Iter2>::iterator_category>::_Iter_random_cat _Cat;
^~~~~~~~~~~~~~~~
_Iter_random
c:\Dev\Programs\MSVS\VC\include/xutility(996) : error: unknown type name '_Iter_random_cat'
c:\Dev\Programs\MSVS\VC\include/xutility(1008) : error: template argument for template type
parameter must be a type
iterator_traits<_Iter1>::iterator_category,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:\Dev\Programs\MSVS\VC\include/xutility(974) : note: template parameter is declared here
template<class _Cat1, class _Cat2, class _Cat3>
^
c:\Dev\Programs\MSVS\VC\include/xutility(1010) : error: expected a qualified name after 'typename'
iterator_traits<_Iter3>::iterator_category>::_Iter_random_cat _Cat;
^
c:\Dev\Programs\MSVS\VC\include/xutility(1010) : error: no template named '_Iter_random_cat'; did
you mean '_Iter_random'?
iterator_traits<_Iter3>::iterator_category>::_Iter_random_cat _Cat;
^~~~~~~~~~~~~~~~
_Iter_random
c:\Dev\Programs\MSVS\VC\include/xutility(1010) : error: unknown type name '_Iter_random_cat'
c:\Dev\Programs\MSVS\VC\include/xutility(1065) : error: expected expression
typedef typename _Checked_iterator_category_helper<_Iter, _...
^
c:\Dev\Programs\MSVS\VC\include/xutility(1065) : error: definition or redeclaration of
'_Checked_cat' cannot name the global scope
...__is_base_of(_Iterator_base_universal, _Iter)>::_Checked_cat _Checked_cat;
~~^
c:\Dev\Programs\MSVS\VC\include/xutility(1065) : error: typedef declarator cannot be qualified
...__is_base_of(_Iterator_base_universal, _Iter)>::_Checked_cat _Checked_cat;
~~^
fatal error: too many errors emitted, stopping now
20 errors generated.
Thanks,
Nate.
_________________________________________________________________
MSN Dating: Find someone special. Start now.
http://go.microsoft.com/?linkid=9729707
More information about the cfe-dev
mailing list