I am running producer consumer problem( using windows thread ).It compiling successfully but on running it showing following error
The procedure entry point InitializeConditionVariable could not located in the dynamic library Kernel32.dll.
can u tell what would be reason
That's an API function that is only available in Vista and up. I would guess that you are running this code on XP.
To avoid accidentally using API functions that are only available in later versions of Windows, you'll want to define the _WIN32_WINNT macro:
#define _WIN32_WINNT 0x502 // Designed to run on Windows XP SP2 and up
#include <windows.h>
If you don't set it then it typically defaults to 0x600 on later versions of the Windows SDK, selecting Vista as the target operating system. Btw, you'll probably have to give up on condition variables. There isn't enough detail in your question to offer a suitable replacement. Code that uses mutexes instead shouldn't be hard to find.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With