Error C2039 'Sleep': is not a member of 'boost::interprocess::winapi' out\build\x64-debug\vcpkg_installed\x64-windows-static\include\boost\interprocess\detail\os_thread_functions.hpp 192
The thread sleep function defined in os_thread_functions.hpp:192 resolves against the sleep macro defined in win32defs.h
os_thread_functions.hpp:192:
inline void thread_sleep(unsigned int ms)
{ winapi::sleep(ms); }
We are using boost interprocess message queue to communicate between the process. The following code works fine in Linux
but in Windows, it fails as follows
Error C2039 'Sleep': is not a member of 'boost::interprocess::winapi' out\build\x64-debug\vcpkg_installed\x64-windows-static\include\boost\interprocess\detail\os_thread_functions.hpp 192
The thread sleep function defined in os_thread_functions.hpp:192 resolves against the sleep macro defined in win32defs.h
os_thread_functions.hpp:192:
win32defs.h:
#define sleep(seconds) Sleep(1000*(DWORD)seconds)
If I undef sleep before including <boost/interprocess/ipc/message_queue.hpp> then Windows compiles fine. Appreciate any help.