<div dir="rtl"><div dir="ltr">Boost tries to supplies its own version of the Windows API to avoid including WIndows.h</div><div dir="ltr">Boost version of the API is not strictly identical to Windows.h, so if Windows.h do get included somehow such errors happen. I always -DBOOST_USE_WINDOWS_H to force Boost to use Windows.h instead of its own. </div><div dir="ltr"><br></div><div dir="ltr"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2015-05-31 20:48 GMT+03:00 Edward Diener <span dir="ltr"><<a href="mailto:eldlistmailingz@tropicsoft.com" target="_blank">eldlistmailingz@tropicsoft.com</a>></span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Compiling some Boost library code the latest clang has produced an inconsistency with gcc on Windows that is making it impossible to build Boost libraries successfully.<br>
<br>
The code in question, where clang is given an error:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
clang-linux.compile.c++.without-pth ..\..\..\bin.v2\libs\context\build\clang-linux-3.7.0\debug\threading-multi\windows\stack_traits.obj<br>
In file included from ..\..\..\libs\context\src\windows\stack_traits.cpp:24:<br>
In file included from ..\..\..\boost/thread.hpp:13:<br>
In file included from ..\..\..\boost/thread/thread.hpp:12:<br>
In file included from ..\..\..\boost/thread/thread_only.hpp:15:<br>
In file included from ..\..\..\boost/thread/win32/thread_data.hpp:10:<br>
In file included from ..\..\..\boost/thread/thread_time.hpp:10:<br>
In file included from ..\..\..\boost/date_time/microsec_time_clock.hpp:23:<br>
..\..\..\boost/date_time/filetime_functions.hpp:57:46: error: conflicting types for 'GetSystemTimeAsFileTime'<br>
__declspec(dllimport) void __stdcall GetSystemTimeAsFileTime(FILETIME* lpFileTime);<br>
^<br>
/mingw/include\winbase.h:1397:24: note: previous declaration is here<br>
WINBASEAPI void WINAPI GetSystemTimeAsFileTime(LPFILETIME);<br>
</blockquote>
^<br>
<br>
and more of the same in many places building Boost libraries with clang.<br>
<br>
This is with the latest clang, which I build with mingw/gcc-4.8.1 on Windows.<br>
<br>
With gcc-4.8.1:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
gcc.compile.c++ ..\..\..\bin.v2\libs\context\build\gcc-mingw-4.8.1\debug\threading-multi\windows\stack_traits.o<br>
</blockquote>
<br>
With gcc-4.9.2<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
gcc.compile.c++ ..\..\..\bin.v2\libs\context\build\gcc-mingw-4.9.2\debug\threading-multi\windows\stack_traits.o<br>
</blockquote>
<br>
This is happening extensively in Boost code which uses the Windows API when compiling under Windows.<br>
<br>
I do not know what WINBASEAPI is supposed to resove to under mingw, but clearly it should not be different for gcc and clang under Windows and gcc has no problems with this.<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>