Boost C++ Libraries: Ticket #11282: VS 2010 with LLVM https://svn.boost.org/trac10/ticket/11282 <p> I can't compile anything that includes BOOST when I use as a compiler clang on MSVC 2010/2013. The error is a compiler error and not a linker error. I already built BOOST for CLANG on windows, but I didn't get to the linking stage. </p> <p> Here is the error log: </p> <p> 1&gt;------ Build started: Project: llvmTest, Configuration: Debug LLVM Win32 ------ 1&gt; In file included from Source.cpp:1: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread.hpp:13: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread/thread.hpp:12: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread/thread_only.hpp:15: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread/win32/thread_data.hpp:10: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread/thread_time.hpp:9: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/date_time/time_clock.hpp:17: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/shared_ptr.hpp:17: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/smart_ptr/shared_ptr.hpp:28: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/smart_ptr/detail/shared_count.hpp:29: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/smart_ptr/detail/sp_counted_base.hpp:45: 1&gt;c:\Boost\include\boost-1_58\boost/smart_ptr/detail/sp_counted_base_clang.hpp(27,8): error : unknown type name '_Atomic' 1&gt; typedef _Atomic( boost::int_least32_t ) atomic_int_least32_t; 1&gt; <sup> 1&gt;c:\Boost\include\boost-1_58\boost/smart_ptr/detail/sp_counted_base_clang.hpp(27,24): error : cannot define or redeclare 'int_least32_t' here because namespace 'detail' does not enclose namespace 'boost' 1&gt; typedef _Atomic( boost::int_least32_t ) atomic_int_least32_t; 1&gt; <del></del><del>~</del></sup><del> 1&gt;c:\Boost\include\boost-1_58\boost/smart_ptr/detail/sp_counted_base_clang.hpp(27,24): error : typedef declarator cannot be qualified 1&gt; typedef _Atomic( boost::int_least32_t ) atomic_int_least32_t; 1&gt; </del><del></del>~<sup> 1&gt;c:\Boost\include\boost-1_58\boost/smart_ptr/detail/sp_counted_base_clang.hpp(27,39): error : expected ';' after top level declarator 1&gt; typedef _Atomic( boost::int_least32_t ) atomic_int_least32_t; 1&gt; </sup> 1&gt;c:\Boost\include\boost-1_58\boost/smart_ptr/detail/sp_counted_base_clang.hpp(29,30): error : unknown type name 'atomic_int_least32_t' 1&gt; inline void atomic_increment( atomic_int_least32_t * pw ) 1&gt; <sup> 1&gt;c:\Boost\include\boost-1_58\boost/smart_ptr/detail/sp_counted_base_clang.hpp(34,46): error : unknown type name 'atomic_int_least32_t' 1&gt; inline boost::int_least32_t atomic_decrement( atomic_int_least32_t * pw ) 1&gt; </sup> 1&gt;c:\Boost\include\boost-1_58\boost/smart_ptr/detail/sp_counted_base_clang.hpp(39,58): error : unknown type name 'atomic_int_least32_t' 1&gt; inline boost::int_least32_t atomic_conditional_increment( atomic_int_least32_t * pw ) 1&gt; <sup> 1&gt;c:\Boost\include\boost-1_58\boost/smart_ptr/detail/sp_counted_base_clang.hpp(68,4): error : unknown type name 'atomic_int_least32_t' 1&gt; atomic_int_least32_t use_count_; <em> #shared 1&gt; </em></sup><em> 1&gt;c:\Boost\include\boost-1_58\boost/smart_ptr/detail/sp_counted_base_clang.hpp(69,4): error : unknown type name 'atomic_int_least32_t' 1&gt; atomic_int_least32_t weak_count_; </em> #weak + (#shared != 0) 1&gt; <sup> 1&gt;c:\Boost\include\boost-1_58\boost/smart_ptr/detail/sp_counted_base_clang.hpp(132,46): error : unknown type name 'atomic_int_least32_t' 1&gt; return <span class="underline">c11_atomic_load( const_cast&lt; atomic_int_least32_t* &gt;( &amp;use_count_ ), </span>ATOMIC_ACQUIRE ); 1&gt; </sup> 1&gt; In file included from Source.cpp:1: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread.hpp:13: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread/thread.hpp:12: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread/thread_only.hpp:15: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread/win32/thread_data.hpp:11: 1&gt;c:\Boost\include\boost-1_58\boost/thread/win32/thread_primitives.hpp(183,53): error : redeclaration of 'Sleep' cannot add 'dllimport' attribute 1&gt; <span class="underline">declspec(dllimport) void </span>stdcall Sleep(unsigned long); 1&gt; <sup> 1&gt; c:\Boost\include\boost-1_58\boost/smart_ptr/detail/yield_k.hpp(63,28) : note: previous declaration is here 1&gt; extern "C" void <span class="underline">stdcall Sleep( unsigned long ms ); 1&gt; </span></sup><span class="underline"> 1&gt; In file included from Source.cpp:1: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread.hpp:13: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread/thread.hpp:12: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread/thread_only.hpp:15: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread/win32/thread_data.hpp:11: 1&gt;c:\Boost\include\boost-1_58\boost/thread/win32/thread_primitives.hpp(418,20): error : no member named 'Sleep' in namespace 'boost::detail::win32'; did you mean simply 'Sleep'? 1&gt; ::boost::detail::win32::Sleep(0); 1&gt; <sup><del></del><del></del><del></del><del></del><del></del><del>~ 1&gt; c:\Boost\include\boost-1_58\boost/smart_ptr/detail/yield_k.hpp(63,28) : note: 'Sleep' declared here 1&gt; extern "C" void </del></sup></span><sup><del>stdcall Sleep( unsigned long ms ); 1&gt; </del></sup><del> 1&gt; In file included from Source.cpp:1: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread.hpp:13: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread/thread.hpp:12: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread/thread_only.hpp:15: 1&gt; In file included from c:\Boost\include\boost-1_58\boost/thread/win32/thread_data.hpp:11: 1&gt;c:\Boost\include\boost-1_58\boost/thread/win32/thread_primitives.hpp(426,44): error : no type named 'Sleep' in namespace 'boost::detail::win32' 1&gt; ::boost::detail::win32::Sleep(milliseconds); 1&gt; </del><del></del><del></del><del></del><del></del><del></del><del><sup> 1&gt; 13 errors generated. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== </sup></del></p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11282 Trac 1.4.3 aaron.adato@… Mon, 11 May 2015 09:34:43 GMT attachment set https://svn.boost.org/trac10/ticket/11282 https://svn.boost.org/trac10/ticket/11282 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">llvmTest.zip</span> </li> </ul> <p> MSVC Source files and project </p> Ticket John Maddock Sun, 17 May 2015 08:53:25 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11282#comment:1 https://svn.boost.org/trac10/ticket/11282#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> Ticket