The prototype of this Win32 function in winbase.h is: WINBASEAPI BOOL IsProcessInJob (HANDLE, HANDLE, PBOOL); This looks incorrect; IMO, it should be: WINBASEAPI BOOL WINAPI IsProcessInJob (HANDLE, HANDLE, PBOOL); The current prototype causes link errors due to this omission, because the linker looks for the wrong symbol in the default libraries.