CodeBlocks compiler error - namespace clash perhaps?

Started by
1 comment, last by stodge 17 years, 4 months ago
I'm getting the following error when compiling my library in CodeBlocks on Windows: <source>error class Habitat::Utils::Timestamp has no member GetTickCount.</source> The compiler is complaining about this code: <source>mTimestamp.GetCurrentTime();</source> So I don't know why it's giving me this error - of course it doesn't have a member GetTickCount as I didn't put one in! I presume it's confusing my Timestamp class with another one it's compiling in, but I don't know why. I've put it into the Habitat::Utils namespace to avoid conflicts, but it still won't compile. Any thoughts? Thanks
---------------------http://www.stodge.net
Advertisement
You may have an unknown header #define somewhere that might rename GetCurrentTime in terms of some function GetTickCount
daerid@gmail.com
Well spotted: in winbase.h there's:

#define GetCurrentTime GetTickCount

Doh! Thanks
---------------------http://www.stodge.net

This topic is closed to new replies.

Advertisement