09 сент. 2014 г., в 18:48, Óscar Fuentes <[email protected]> написал(а):
> Alexey Pavlov <[email protected]> > writes: > >>> Now clang++ fails with Boost. Previously I was able to build this >>> >>> // File foo.cpp >>> #include <boost/thread> >>> >>> >>> with this command: >>> >>> clang++ -c -DBOOST_USE_WINDOWS_H -Ic:/apps/msys32/mingw32/include foo.cpp >>> >>> But now fails with conflicting declarations. Because of this I was not >>> able to reach the linking phase. If I have some free time I'll try >>> removing the dependency on boost::thread. >>> >>> >> Can you show me errors? > > With the latest clang package, that has mingw32/include on its search > path (thanks!) the compile command for the file `foo.cpp' quoted above > is: > > > clang++ -c -DBOOST_USE_WINDOWS_H foo.cpp > > and this is the output: > > > In file included from foo.cpp:1: > In file included from > c:\apps\msys32\mingw32\bin/../include\boost/thread.hpp:13: > In file included from > c:\apps\msys32\mingw32\bin/../include\boost/thread/thread.hpp:12: > In file included from > c:\apps\msys32\mingw32\bin/../include\boost/thread/thread_only.hpp:15: > In file included from > c:\apps\msys32\mingw32\bin/../include\boost/thread/win32/thread_data.hpp:11: > c:\apps\msys32\mingw32\bin/../include\boost/thread/win32/thread_primitives.hpp:172:70: > error: conflicting types for 'GetProcAddress' > __declspec(dllimport) detail::farproc_t __stdcall > GetProcAddress(void *, const char *); > ^ > c:\apps\msys32\mingw32\bin/../i686-w64-mingw32/include\libloaderapi.h:135:29: > note: previous declaration is here > WINBASEAPI FARPROC WINAPI GetProcAddress (HMODULE hModule, LPCSTR > lpProcName); > ^ > In file included from foo.cpp:1: > In file included from > c:\apps\msys32\mingw32\bin/../include\boost/thread.hpp:13: > In file included from > c:\apps\msys32\mingw32\bin/../include\boost/thread/thread.hpp:12: > In file included from > c:\apps\msys32\mingw32\bin/../include\boost/thread/thread_only.hpp:15: > In file included from > c:\apps\msys32\mingw32\bin/../include\boost/thread/win32/thread_data.hpp:11: > c:\apps\msys32\mingw32\bin/../include\boost/thread/win32/thread_primitives.hpp:174:59: > error: functions that differ only in their return type cannot be overloaded > __declspec(dllimport) void * __stdcall > GetModuleHandleA(const char *); > ^ > c:\apps\msys32\mingw32\bin/../i686-w64-mingw32/include\libloaderapi.h:85:29: > note: previous declaration is here > WINBASEAPI HMODULE WINAPI GetModuleHandleA (LPCSTR lpModuleName); > ^ > In file included from foo.cpp:1: > In file included from > c:\apps\msys32\mingw32\bin/../include\boost/thread.hpp:13: > In file included from > c:\apps\msys32\mingw32\bin/../include\boost/thread/thread.hpp:12: > In file included from > c:\apps\msys32\mingw32\bin/../include\boost/thread/thread_only.hpp:15: > In file included from > c:\apps\msys32\mingw32\bin/../include\boost/thread/win32/thread_data.hpp:11: > c:\apps\msys32\mingw32\bin/../include\boost/thread/win32/thread_primitives.hpp:178:31: > error: functions that differ only in their return type cannot be overloaded > int __stdcall GetTickCount(); > ^ > c:\apps\msys32\mingw32\bin/../i686-w64-mingw32/include\sysinfoapi.h:76:27: > note: previous declaration is here > WINBASEAPI DWORD WINAPI GetTickCount (VOID); > ^ > 3 errors generated. > > > > and without -DBOOST_USE_WINDOWS_H : > > > clang++ -c foo.cpp > > > In file included from foo.cpp:1: > In file included from > c:\apps\msys32\mingw32\bin/../include\boost/thread.hpp:13: > In file included from > c:\apps\msys32\mingw32\bin/../include\boost/thread/thread.hpp:12: > In file included from > c:\apps\msys32\mingw32\bin/../include\boost/thread/thread_only.hpp:15: > In file included from > c:\apps\msys32\mingw32\bin/../include\boost/thread/win32/thread_data.hpp:11: > c:\apps\msys32\mingw32\bin/../include\boost/thread/win32/thread_primitives.hpp:133:54: > error: redeclaration of 'Sleep' cannot add 'dllimport' attribute > __declspec(dllimport) void __stdcall Sleep(unsigned long); > ^ > c:\apps\msys32\mingw32\bin/../include\boost/smart_ptr/detail/yield_k.hpp:63:29: > note: previous declaration is here > extern "C" void __stdcall Sleep( unsigned long ms ); > ^ > 1 error generated. > > Maybe some defines I missing. Try build with save temps to see what is wrong > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce. > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Msys2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/msys2-users ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce. Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Msys2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/msys2-users
