undeclared identifers

I just upgraded from Win98 to XP and tried to build my OpenGL program but the compiler doesn’t recognise GetTickCount(…) and memset(…) anymore. What do I need to change to rectify this?

thx in advance

Well, for the memset you have to include te header stdlib.h

#include <stdlib.h>

For getting the count I you may need to include the windows header…

#include <windows.h>

You can also learn to program before trying opengl instead of asking question about system includes on an opengl forums.

Thank you

It’s also questionable as to whether going from 98 to xp is an upgrade. :stuck_out_tongue:

Believe me it is an upgrade. Win98 is so buggy\crashy it does my fugging head-in. I haven’t needed to use the reset button once in 2 months of coding with XP.

agree Evil-Dog

Go chew a bone evil dog!!
The code worked fine on a 98 OS but wouldnt compile on XP. I thought perhaps others had encountered a similar problem when upgrading.

Was it an upgrade or did you totally re-install. It seems odd that changing OS would have done anything different with your compiling environment. Unless maybe some #defines include some of those headers for an NT based OS but not for a 9x based OS. Seems odd it would do that for those, though…

Anyway, I agree with Evil-dog that if you were more experienced in C/C++, the first thing you’d have checked would be what includes were needed for those functions.

Sorry Endo I was rude hehehe

But still it was a very basic programming question.
but it’s ok.
Now you know that you have to at least check for the needed includes when you get that error. And we’re here to learn aren’t we ?
Well, I’ll go chew a bone now, ciao guys.


Evil-Dog
Let’s have a funny day

Actually I did solve it by including more headers (memory.h and windows.h) but I still dont know why it should change from being on a Win 98 sytem to an XP system. I saved the whole project folder onto a zip disk to avoid any such problems

Anyway it was a clean install on a freshly formatted drive.