<DIV>If Your using Microsoft C++STL ,Must use driver mode cl .</DIV>
<DIV>clang --driver-mode=cl or clang-cl /cl</DIV>
<DIV>But clang-cl not support RIIT so ,Your must using -D_HAS_EXCEPTIONS=0 && /GR- Now;</DIV>
<DIV>For example:</DIV>
<DIV>If clang:<BR>clang --driver-mode=cl -D_HAS_EXCEPTIONS=0 /GR- file.cpp<BR>If clang-cl or cl:<BR>clang-cl -D_HAS_EXCEPTIONS=0 /GR- file.cpp</DIV><div> </div><div><sign signid="0"><div style="color:#909090;font-family:Arial Narrow;font-size:12px">------------------</div><div style='font-size:14px;font-family:Verdana;color:#000;'><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=1053112601&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:1053112601:50" title="点击这里给我发消息" /></a></div></sign></div><div> </div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>From:</b> "Edward Diener"<eldlistmailingz@tropicsoft.com>; </div><div><b>Date:</b> 2013年10月14日(星期一) 中午1:27</div><div><b>To:</b> "Clang"<cfe-dev@cs.uiuc.edu>; </div><div><b>Subject:</b> [cfe-dev] Linker problems with clang on Windows using VC++ RTL andBoost</div></div><div><br></div>I am trying to run the Boost type_traits tests using my own build of the <BR>latest clang on Windows under VC++, and I am getting these linker errors:<BR><BR>"clang-linux.link <BR>..\..\..\bin.v2\libs\type_traits\test\add_const_test.test\clang-linux-3.4\debug\add_const_test.exe<BR><BR> "C:/Programming/VersionControl/bclang/bin/Release/clang.exe" -o <BR>"..\..\..\bin.v2\libs\type_traits\test\add_const_test.test\clang-linux-3.4\debug\add_const_test.exe" <BR>"..\..\..\bin.v2\libs\type_traits\test\add_const_test.test\clang-linux-3.4\debug\add_const_test.obj" <BR> -g<BR><BR>clang.exe: warning: argument unused during compilation: '-g'<BR>add_const_test.obj : error LNK2019: unresolved external symbol __ZdlPv <BR>referenced in function __ZNSt14error_categoryD0Ev<BR>add_const_test.obj : error LNK2019: unresolved external symbol <BR>___dso_handle referenced in function ___cxx_global_var_init<BR>add_const_test.obj : error LNK2019: unresolved external symbol <BR>___cxa_atexit referenced in function ___cxx_global_var_init<BR>add_const_test.obj : error LNK2019: unresolved external symbol <BR>__ZSt13_Winerror_mapi referenced in function <BR>__ZNKSt22_System_error_category7messageEi<BR>add_const_test.obj : error LNK2019: unresolved external symbol <BR>__ZSt13_Syserror_mapi referenced in function <BR>__ZNKSt22_System_error_category23default_error_conditionEi<BR>add_const_test.obj : error LNK2019: unresolved external symbol <BR>__ZSt14_Xlength_errorPKc referenced in function __ZNKSs5_XlenEv<BR>add_const_test.obj : error LNK2019: unresolved external symbol <BR>___cxa_begin_catch referenced in function ___clang_call_terminate<BR>add_const_test.obj : error LNK2019: unresolved external symbol <BR>__ZSt9terminatev referenced in function ___clang_call_terminate<BR>add_const_test.obj : error LNK2019: unresolved external symbol __Znwj <BR>referenced in function __ZSt9_AllocateIcEPT_jS1_<BR>add_const_test.obj : error LNK2019: unresolved external symbol <BR>__ZSt11_Xbad_allocv referenced in function __ZSt9_AllocateIcEPT_jS1_<BR>add_const_test.obj : error LNK2019: unresolved external symbol <BR>__ZSt14_Xout_of_rangePKc referenced in function __ZNKSs5_XranEv<BR>add_const_test.obj : error LNK2001: unresolved external symbol <BR>___cxa_pure_virtual<BR>add_const_test.obj : error LNK2001: unresolved external symbol <BR>__ZTVN10__cxxabiv117__class_type_infoE<BR>add_const_test.obj : error LNK2001: unresolved external symbol <BR>__ZTVN10__cxxabiv120__si_class_type_infoE<BR>..\..\..\bin.v2\libs\type_traits\test\add_const_test.test\clang-linux-3.4\debug\add_const_test.exe <BR>: fatal error LNK1120: 14 unresolved externals<BR>clang.exe: error: linker command failed with exit code 1120 (use -v to <BR>see invocation)"<BR><BR>Does anybody have an idea of why these errors are occurring ?<BR><BR>_______________________________________________<BR>cfe-dev mailing list<BR><A href="mailto:cfe-dev@cs.uiuc.edu" target=_blank>cfe-dev@cs.u<WBR>iuc.edu</A><BR><A href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target=_blank>http://lists<WBR>.cs.uiuc.edu<WBR>/mailman/lis<WBR>tinfo/cfe-de<WBR>v</A><BR>.<BR>