Windows 10/Clang 11 RC2: mismatch of pre-compiled _CRT_STDIO_ISO_WIDE_SPECIFIERS and RuntimeLibrary (MTd_StaticDebug vs MT_StaticRelease )

Hi.
I am experiencing some issues on Windows 10 (32bit) - I am trying to use libc++ “from scratch”.

Here I am trying to set libc++'s include path ahead of Microsoft’s headers.

C:\Users\clang>clang++ -H -Ilibc++\include -Llibc++\build\lib test1.cpp

I am able to track my includes:

. libc++\include\iostream
… libc++\include\__config
… libc++\include\ios
… libc++\include\iosfwd
… libc++\include\wchar.h
… libc++\include\stddef.h
… C:\Program Files\LLVM\lib\clang\11.0.0\include\stddef.h
… C:\Program Files\LLVM\lib\clang\11.0.0\include/__stddef_max_align_t.h
… libc++\include\__nullptr
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\wchar.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\vcruntime.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\sal.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\concurrencysal.h
… C:\Program Files\LLVM\lib\clang\11.0.0\include\vadefs.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\vadefs.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_memcpy_s.h
… libc++\include\errno.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\errno.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\vcruntime_string.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wconio.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_stdio_config.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wctype.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wdirect.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wio.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_share.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wprocess.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wstdio.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wstdlib.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wstring.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_wtime.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\sys/stat.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\sys/types.h
… libc++\include\__locale
… libc++\include\string
… libc++\include\string_view
… libc++\include\__string
… libc++\include\algorithm
… libc++\include\initializer_list
… libc++\include\cstddef
… libc++\include\version
… C:\Program Files\LLVM\lib\clang\11.0.0\include\stddef.h
… libc++\include\type_traits
… libc++\include\cstring
… libc++\include\string.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\string.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_memory.h
… libc++\include\utility
… libc++\include\__tuple
… libc++\include\cstdint
… libc++\include\stdint.h
… C:\Program Files\LLVM\lib\clang\11.0.0\include\stdint.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\stdint.h
… libc++\include\__debug
… libc++\include\memory
… libc++\include\typeinfo
… libc++\include\exception
… libc++\include\cstdlib
… libc++\include\stdlib.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\stdlib.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_search.h
… libc++\include\stddef.h
… libc++\include\limits.h
… C:\Program Files\LLVM\lib\clang\11.0.0\include\limits.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\limits.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\vcruntime_exception.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\eh.h
… C:\Program Files\LLVM\lib\clang\11.0.0\include\vadefs.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_terminate.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\vcruntime_typeinfo.h
… libc++\include\new
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\new.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\vcruntime_new_debug.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\vcruntime_new.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\crtdefs.h
… libc++\include\limits
… libc++\include\__undef_macros
… libc++\include\iterator
… libc++\include\__functional_base
… libc++\include\tuple
… libc++\include\stdexcept
… libc++\include\atomic
… libc++\include\__threading_support
… libc++\include\chrono
… libc++\include\ctime
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\time.h
… libc++\include\ratio
… libc++\include\climits
… libc++\include\__undef_macros
… libc++\include\__undef_macros
… libc++\include\__undef_macros
… libc++\include\__undef_macros
… libc++\include\functional
… libc++\include\bit
… libc++\include\__undef_macros
… libc++\include\__undef_macros
… libc++\include\cstdio
… libc++\include\stdio.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\stdio.h
… libc++\include\__undef_macros
… libc++\include\__undef_macros
… libc++\include\cwchar
… libc++\include\cwctype
… libc++\include\cctype
… libc++\include\ctype.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\ctype.h
… libc++\include\wctype.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\wctype.h
… libc++\include\wchar.h
… libc++\include\__undef_macros
… libc++\include\mutex
… libc++\include\__mutex_base
… libc++\include\system_error
… libc++\include\__errc
… libc++\include\cerrno
… libc++\include\__undef_macros
… libc++\include\__undef_macros
… libc++\include\locale.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\locale.h
… libc++\include\support/win32/locale_win32.h
… libc++\include\stdio.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xlocinfo.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\yvals.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\yvals_core.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xkeycheck.h
… C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\crtdbg.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\crtdefs.h
… C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\use_ansi.h
… libc++\include\stdio.h
… libc++\include\wchar.h
… libc++\include\streambuf
… libc++\include\__undef_macros
… libc++\include\istream
… libc++\include\ostream
… libc++\include\locale
… libc++\include\cstdarg
… C:\Program Files\LLVM\lib\clang\11.0.0\include\stdarg.h
… libc++\include\__bsd_locale_defaults.h
… libc++\include\__undef_macros
… libc++\include\bitset
… libc++\include\__bit_reference
… libc++\include\__undef_macros
… libc++\include\__undef_macros
… libc++\include\__undef_macros
. libc++\include\vector
… libc++\include\__split_buffer
… libc++\include\__undef_macros
… libc++\include\__undef_macros

And then the linker raises some errors:

libc++.lib(locale_win32.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(locale_win32.cpp.obj) : error LNK2038: mismatch detected for ‘RuntimeLibrary’: value ‘MTd_StaticDebug’ doesn’t match value ‘MT_StaticRelease’ in test1-2a9878.o
libc++.lib(exception.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(stdexcept.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(thread_win32.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(memory.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(system_error.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(locale.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(locale.cpp.obj) : error LNK2038: mismatch detected for ‘RuntimeLibrary’: value ‘MTd_StaticDebug’ doesn’t match value ‘MT_StaticRelease’ in test1-2a9878.o
libc++.lib(ios.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(ios.cpp.obj) : error LNK2038: mismatch detected for ‘RuntimeLibrary’: value ‘MTd_StaticDebug’ doesn’t match value ‘MT_StaticRelease’ in test1-2a9878.o
libc++.lib(new.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(support.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(string.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(chrono.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(mutex.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(vector.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(charconv.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(condition_variable.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(thread.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
libc++.lib(future.cpp.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o
iso_stdio_wide_specifiers.lib(iso_stdio_wide_specifiers.obj) : error LNK2038: mismatch detected for ‘_CRT_STDIO_ISO_WIDE_SPECIFIERS’: value ‘1’ doesn’t match value ‘0’ in test1-2a9878.o

My test1.cpp contains

#include
#include
#include

struct record {
std::string name;
int id;
};

auto find_id(const std::vector &people,
const std::string &name)
{
auto match_name = [&name](const record& r) → bool {
return r.name == name;
};
auto ii = find_if(people.begin(), people.end(), match_name );
if (ii == people.end())
return -1;
else
return ii->id;
}

int main()
{
std::vector roster = { {“mark”,1},
{“bill”,2},
{“ted”,3}};
std::cout << find_id(roster,“bill”) << “\n”;
std::cout << find_id(roster,“ron”) << “\n”;
}

The rest of the output:

Creating library a.lib and object a.exp
LINK : warning LNK4217: symbol ‘??6?$basic_ostream@DU?$char_traits@D@__1@std@@@__1@std@@QAEAAV012@H@Z (public: class std::__1::basic_ostream<char,struct std::__1::char_traits > & __thiscall std::__1::basic_ostream<char,struct std::__1::char_traits >::operator<<(int))’ defined in ‘libc++.lib(ios.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘_main’
LINK : warning LNK4217: symbol ‘??1?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@QAE@XZ (public: __thiscall std::__1::basic_string<char,struct std::__1::char_traits,class std::__1::allocator >::~basic_string<char,struct std::__1::char_traits,class std::__1::allocator >(void))’ defined in ‘libc++.lib(string.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘_main’
LINK : warning LNK4217: symbol ‘?__init@?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@AAEXPBDI@Z (private: void __thiscall std::__1::basic_string<char,struct std::__1::char_traits,class std::__1::allocator >::__init(char const *,unsigned int))’ defined in ‘libc++.lib(string.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“public: __thiscall std::__1::basic_string<char,struct std::__1::char_traits,class std::__1::allocator >::basic_string<char,struct std::__1::char_traits,class std::__1::allocator >std::nullptr_t(char const *)” (??$?0$$T@?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@QAE@PBD@Z)’
LINK : warning LNK4217: symbol ‘??0?$__vector_base_common@$00@__1@std@@IAE@XZ (protected: __thiscall std::__1::__vector_base_common<1>::__vector_base_common<1>(void))’ defined in ‘libc++.lib(locale.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“protected: __thiscall std::__1::__vector_base<struct record,class std::__1::allocator >::__vector_base<struct record,class std::__1::allocator >(void)” (??0?$__vector_base@Urecord@@V?$allocator@Urecord@@@__1@std@@@__1@std@@IAE@XZ)’
LINK : warning LNK4217: symbol ‘?__throw_length_error@?$__vector_base_common@$00@__1@std@@IBEXXZ (protected: void __thiscall std::__1::__vector_base_common<1>::__throw_length_error(void)const )’ defined in ‘libc++.lib(vector.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“private: void __thiscall std::__1::vector<struct record,class std::__1::allocator >::__vallocate(unsigned int)” (?__vallocate@?$vector@Urecord@@V?$allocator@Urecord@@@__1@std@@@__1@std@@AAEXI@Z)’
LINK : warning LNK4217: symbol ‘??0length_error@std@@QAE@PBD@Z (public: __thiscall std::length_error::length_error(char const *))’ defined in ‘libc++.lib(locale_win32.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“void __cdecl std::__1::__throw_length_error(char const *)” (?__throw_length_error@__1@std@@YAXPBD@Z)’
LINK : warning LNK4217: symbol ‘??0?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@QAE@ABV012@@Z (public: __thiscall std::__1::basic_string<char,struct std::__1::char_traits,class std::__1::allocator >::basic_string<char,struct std::__1::char_traits,class std::__1::allocator >(class std::__1::basic_string<char,struct std::__1::char_traits,class std::__1::allocator > const &))’ defined in ‘libc++.lib(string.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“public: __thiscall record::record(struct record const &)” (??0record@@QAE@ABU0@@Z)’
LINK : warning LNK4217: symbol ‘?fill@?$basic_ios@DU?$char_traits@D@__1@std@@@__1@std@@QBEDXZ (public: char __thiscall std::__1::basic_ios<char,struct std::__1::char_traits >::fill(void)const )’ defined in ‘libc++.lib(ios.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“class std::__1::basic_ostream<char,struct std::__1::char_traits > & __cdecl std::__1::__put_character_sequence<char,struct std::__1::char_traits >(class std::__1::basic_ostream<char,struct std::__1::char_traits > &,char const *,unsigned int)” (??$__put_character_sequence@DU?$char_traits@D@__1@std@@@__1@std@@YAAAV?$basic_ostream@DU?$char_traits@D@__1@std@@@01@AAV201@PBDI@Z)’
LINK : warning LNK4217: symbol ‘?flags@ios_base@__1@std@@QBEIXZ (public: unsigned int __thiscall std::__1::ios_base::flags(void)const )’ defined in ‘libc++.lib(locale_win32.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“class std::__1::basic_ostream<char,struct std::__1::char_traits > & __cdecl std::__1::__put_character_sequence<char,struct std::__1::char_traits >(class std::__1::basic_ostream<char,struct std::__1::char_traits > &,char const *,unsigned int)” (??$__put_character_sequence@DU?$char_traits@D@__1@std@@@__1@std@@YAAAV?$basic_ostream@DU?$char_traits@D@__1@std@@@01@AAV201@PBDI@Z)’
LINK : warning LNK4217: symbol ‘?setstate@?$basic_ios@DU?$char_traits@D@__1@std@@@__1@std@@QAEXI@Z (public: void __thiscall std::__1::basic_ios<char,struct std::__1::char_traits >::setstate(unsigned int))’ defined in ‘libc++.lib(ios.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“class std::__1::basic_ostream<char,struct std::__1::char_traits > & __cdecl std::__1::__put_character_sequence<char,struct std::__1::char_traits >(class std::__1::basic_ostream<char,struct std::__1::char_traits > &,char const *,unsigned int)” (??$__put_character_sequence@DU?$char_traits@D@__1@std@@@__1@std@@YAAAV?$basic_ostream@DU?$char_traits@D@__1@std@@@01@AAV201@PBDI@Z)’
LINK : warning LNK4217: symbol ‘?__set_badbit_and_consider_rethrow@ios_base@__1@std@@QAEXXZ (public: void __thiscall std::__1::ios_base::__set_badbit_and_consider_rethrow(void))’ defined in ‘libc++.lib(ios.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘"int class __1::catch$14::basic_ostream<char,struct std::__1::char_traits<char> > & __cdecl std::__1::__put_character_sequence<char,struct std::__1::char_traits<char> >(class __1::catch$14::std &,char const *,unsigned int)'::1’::catch$14" (?catch$14@?0???$__put_character_sequence@DU?$char_traits@D@__1@std@@@__1@std@@YAAAV?$basic_ostream@DU?$char_traits@D@__1@std@@@01@AAV201@PBDI@Z@4HA)’
LINK : warning LNK4217: symbol ‘?good@?$basic_ios@DU?$char_traits@D@__1@std@@@__1@std@@QBE_NXZ (public: bool __thiscall std::__1::basic_ios<char,struct std::__1::char_traits >::good(void)const )’ defined in ‘libc++.lib(ios.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“public: __thiscall std::__1::basic_ostream<char,struct std::__1::char_traits >::sentry::sentry(class std::__1::basic_ostream<char,struct std::__1::char_traits > &)” (??0sentry@?$basic_ostream@DU?$char_traits@D@__1@std@@@__1@std@@QAE@AAV123@@Z)’
LINK : warning LNK4217: symbol ‘?tie@?$basic_ios@DU?$char_traits@D@__1@std@@@__1@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@__1@std@@@23@XZ (public: class std::__1::basic_ostream<char,struct std::__1::char_traits > * __thiscall std::__1::basic_ios<char,struct std::__1::char_traits >::tie(void)const )’ defined in ‘libc++.lib(ios.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“public: __thiscall std::__1::basic_ostream<char,struct std::__1::char_traits >::sentry::sentry(class std::__1::basic_ostream<char,struct std::__1::char_traits > &)” (??0sentry@?$basic_ostream@DU?$char_traits@D@__1@std@@@__1@std@@QAE@AAV123@@Z)’
LINK : warning LNK4217: symbol ‘?flush@?$basic_ostream@DU?$char_traits@D@__1@std@@@__1@std@@QAEAAV123@XZ (public: class std::__1::basic_ostream<char,struct std::__1::char_traits > & __thiscall std::__1::basic_ostream<char,struct std::__1::char_traits >::flush(void))’ defined in ‘libc++.lib(ios.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“public: __thiscall std::__1::basic_ostream<char,struct std::__1::char_traits >::sentry::sentry(class std::__1::basic_ostream<char,struct std::__1::char_traits > &)” (??0sentry@?$basic_ostream@DU?$char_traits@D@__1@std@@@__1@std@@QAE@AAV123@@Z)’
LINK : warning LNK4217: symbol ‘?width@ios_base@__1@std@@QBEHXZ (public: int __thiscall std::__1::ios_base::width(void)const )’ defined in ‘libc++.lib(locale_win32.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“class std::__1::ostreambuf_iterator<char,struct std::__1::char_traits > __cdecl std::__1::__pad_and_output<char,struct std::__1::char_traits >(class std::__1::ostreambuf_iterator<char,struct std::__1::char_traits >,char const *,char const *,char const *,class std::__1::ios_base &,char)” (??$__pad_and_output@DU?$char_traits@D@__1@std@@@__1@std@@YA?AV?$ostreambuf_iterator@DU?$char_traits@D@__1@std@@@01@V201@PBD11AAVios_base@01@D@Z)’
LINK : warning LNK4217: symbol ‘?sputn@?$basic_streambuf@DU?$char_traits@D@__1@std@@@__1@std@@QAEHPBDH@Z (public: int __thiscall std::__1::basic_streambuf<char,struct std::__1::char_traits >::sputn(char const *,int))’ defined in ‘libc++.lib(ios.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“class std::__1::ostreambuf_iterator<char,struct std::__1::char_traits > __cdecl std::__1::__pad_and_output<char,struct std::__1::char_traits >(class std::__1::ostreambuf_iterator<char,struct std::__1::char_traits >,char const *,char const *,char const *,class std::__1::ios_base &,char)” (??$__pad_and_output@DU?$char_traits@D@__1@std@@@__1@std@@YA?AV?$ostreambuf_iterator@DU?$char_traits@D@__1@std@@@01@V201@PBD11AAVios_base@01@D@Z)’
LINK : warning LNK4217: symbol ‘?width@ios_base@__1@std@@QAEHH@Z (public: int __thiscall std::__1::ios_base::width(int))’ defined in ‘libc++.lib(locale_win32.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“class std::__1::ostreambuf_iterator<char,struct std::__1::char_traits > __cdecl std::__1::__pad_and_output<char,struct std::__1::char_traits >(class std::__1::ostreambuf_iterator<char,struct std::__1::char_traits >,char const *,char const *,char const *,class std::__1::ios_base &,char)” (??$__pad_and_output@DU?$char_traits@D@__1@std@@@__1@std@@YA?AV?$ostreambuf_iterator@DU?$char_traits@D@__1@std@@@01@V201@PBD11AAVios_base@01@D@Z)’
LINK : warning LNK4217: symbol ‘?rdbuf@?$basic_ios@DU?$char_traits@D@__1@std@@@__1@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@__1@std@@@23@XZ (public: class std::__1::basic_streambuf<char,struct std::__1::char_traits > * __thiscall std::__1::basic_ios<char,struct std::__1::char_traits >::rdbuf(void)const )’ defined in ‘libc++.lib(ios.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“public: __thiscall std::__1::ostreambuf_iterator<char,struct std::__1::char_traits >::ostreambuf_iterator<char,struct std::__1::char_traits >(class std::__1::basic_ostream<char,struct std::__1::char_traits > &)” (??0?$ostreambuf_iterator@DU?$char_traits@D@__1@std@@@__1@std@@QAE@AAV?$basic_ostream@DU?$char_traits@D@__1@std@@@12@@Z)’
LINK : warning LNK4217: symbol ‘?uncaught_exception@std@@YA_NXZ (bool __cdecl std::uncaught_exception(void))’ defined in ‘libc++.lib(exception.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“public: __thiscall std::__1::basic_ostream<char,struct std::__1::char_traits >::sentry::~sentry(void)” (??1sentry@?$basic_ostream@DU?$char_traits@D@__1@std@@@__1@std@@QAE@XZ)’
LINK : warning LNK4217: symbol ‘?pubsync@?$basic_streambuf@DU?$char_traits@D@__1@std@@@__1@std@@QAEHXZ (public: int __thiscall std::__1::basic_streambuf<char,struct std::__1::char_traits >::pubsync(void))’ defined in ‘libc++.lib(ios.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“public: __thiscall std::__1::basic_ostream<char,struct std::__1::char_traits >::sentry::~sentry(void)” (??1sentry@?$basic_ostream@DU?$char_traits@D@__1@std@@@__1@std@@QAE@XZ)’
LINK : warning LNK4217: symbol ‘?__init@?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@AAEXID@Z (private: void __thiscall std::__1::basic_string<char,struct std::__1::char_traits,class std::__1::allocator >::__init(unsigned int,char))’ defined in ‘libc++.lib(string.cpp.obj)’ is imported by ‘test1-2a9878.o’ in function ‘“public: __thiscall std::__1::basic_string<char,struct std::__1::char_traits,class std::__1::allocator >::basic_string<char,struct std::__1::char_traits,class std::__1::allocator >(unsigned int,char)” (??0?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@QAE@ID@Z)’
test1-2a9878.o : error LNK2019: unresolved external symbol “__declspec(dllimport) class std::__1::basic_ostream<char,struct std::__1::char_traits > std::__1::cout” (_imp?cout@__1@std@@3V?$basic_ostream@DU?$char_traits@D@__1@std@@@12@A) referenced in function _main
libc++.lib(locale.cpp.obj) : error LNK2019: unresolved external symbol __chvalidator_l referenced in function __chvalidchk_l
a.exe : fatal error LNK1120: 2 unresolved externals

Ivan