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.