VS2005 havok project noob problem!

VS2005 havok project noob problem!

Apologies in advance for this one!

ive double checked that ivelinked all the .lib files and added the include directories needed, but when i try to compile my project i stillget the following errors:

HavokSourceCommonBaseThreadCriticalSectionWin32hkWin32CriticalSection.inl(27) : error C3861: 'InitializeCriticalSectionAndSpinCount': identifier not found
HavokSourceCommonBaseThreadCriticalSectionWin32hkWin32CriticalSection.inl(88) : error C3861: 'TryEnterCriticalSection': identifier not found
Apart from that i dont get any other errors and im very perplexed!.
ps, im not a complete novice,  but if i have to  do anything fancy could some1 explain it to me in bite sized chunks lol. Its been a long day and i am low on caffiene!
8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I'll plagiarize havokmarc from an older thread here:

To compile an application that uses
InitializeCriticalSectionAndSpinCount, define _WIN32_WINNT as 0x0403 or
later. For more information, see Using the Windows Headers.

Hope that helps.

hmm.. ive added the line

#define _WIN32_WINNT 0x0502

directly above the havok includes, but still getting the same errors :S anything else i should be trying?

wait! wait! i added it to preprocessor defines in the project properties directly and that cleared it up!


(sorry i didnt see that other thread, i did have a good look before posting i promise :) )

I think you need it before your Windows includes (winnt.h or windows.h) too. If all else fails, try adding it to the preprocessor defines for the project (Properties > C++ > Preprocessor).


lol, same idea at the same time!

Thanks for all the help thought, this really is a fantastic forum! Its VERY unusual to get such good (and quick and accurate) help from devs on a forum! fantastic job! THANKS!

You're welcome! We've got some folks in the SF office that handle most of the forum questions, I just try to pitch in when I have time (and when I know the answer).

Now go and make something cool!


added the line

#define _WIN32_WINNT 0x0502

solved problem thanks

Login to leave a comment.