PDA

View Full Version : undeclared identifers



endo
05-13-2002, 06:50 AM
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

Miguel_dup1
05-14-2002, 10:58 AM
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>

Evil-Dog
05-15-2002, 05:43 AM
You can also learn to program before trying opengl instead of asking question about system includes on an opengl forums.

Thank you

jmg
05-15-2002, 06:04 AM
It's also questionable as to whether going from 98 to xp is an upgrade. :P

Robbo
05-15-2002, 06:24 AM
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.

Omaha
05-15-2002, 02:42 PM
agree Evil-Dog

endo
05-16-2002, 02:31 AM
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.

Deiussum
05-16-2002, 04:47 AM
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.

Evil-Dog
05-16-2002, 07:42 AM
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. http://www.opengl.org/discussion_boards/ubb/smile.gif

--------------------------------------
Evil-Dog
*Let's have a funny day*

endo
05-17-2002, 02:43 AM
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 http://www.opengl.org/discussion_boards/ubb/frown.gif

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