id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6145,MinGW / GCC 4.6.1 warns about conflicts between Boost.Thread and Boost.InterProcess (Win32 C API),Cyril Othenin-Girard ,Ion Gaztañaga,"I compile boost-1.48 with GCC 4.6.1 using MinGW-32 3.10 on Windows XP. My compiling options are : {{{ g++ -std=c++0x }}} I encounter the following conflicts : {{{ ~/boost-1.48/interprocess/detail/win32_api.hpp:808:116: warning: declaration of 'void* boost::interprocess::winapi::CreateMutexA(boost::interprocess::winapi::interprocess_security_attributes*, int, const char*)' with C language linkage [enabled by default] ~/boost-1.48/thread/win32/thread_primitives.hpp:119:55: warning: conflicts with previous declaration 'void* boost::detail::win32::CreateMutexA(boost::detail::win32::_SECURITY_ATTRIBUTES*, int, const char*)' [enabled by default] }}} {{{ ~/boost-1.48/interprocess/detail/win32_api.hpp:813:127: warning: declaration of 'void* boost::interprocess::winapi::CreateSemaphoreA(boost::interprocess::winapi::interprocess_security_attributes*, long int, long int, const char*)' with C language linkage [enabled by default] ~/boost-1.48/thread/win32/thread_primitives.hpp:120:55: warning: conflicts with previous declaration 'void* boost::detail::win32::CreateSemaphoreA(boost::detail::win32::_SECURITY_ATTRIBUTES*, long int, long int, const char*)' [enabled by default] }}} The problem looks like closed tickets #4217 and #5030. It looks like ""extern C"" modifier make the compiler to ignore namespace declarations, hence the conflicts. For example, discarding namespaces, '''Boost.Thread''' declares CreateMutexA() like this : {{{ extern ""C"" { struct _SECURITY_ATTRIBUTES; __declspec(dllimport) void* __stdcall CreateMutexA('''boost::detail::win32::_SECURITY_ATTRIBUTES'''*,int,char const*); } }}} whereas '''Boost.Interprocess''' declares it like this : {{{ struct interprocess_security_attributes { unsigned long nLength; void *lpSecurityDescriptor; int bInheritHandle; }; extern ""C"" __declspec(dllimport) void * __stdcall CreateMutexA('''boost::interprocess::winapi::interprocess_security_attributes'''*, int, const char *); }}} To avoid the compiler warnings, the same type should be used for the first parameter of CreateMutexA().",Bugs,new,To Be Determined,interprocess,Boost 1.48.0,Problem,,MinGW interprocess thread warning conflict,