Jump to content
  • Advertisement
Sign in to follow this  
graveyard filla

strange errors

This topic is 5458 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, i recently opened up my 2d RPG project for the first time in a month or so. ive been working on learning network programming and the level editor. anyway, i open the source and go to compile it, and am getting a bunch of strange errors. they all appear to be coming from the "ctime" file. heres the errors:
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(17) : error C2039: 'clock_t' : is not a member of 'operator``global namespace'''
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(17) : error C2873: 'clock_t' : symbol cannot be used in a using-declaration
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(19) : error C2039: 'asctime' : is not a member of 'operator``global namespace'''
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(19) : error C2873: 'asctime' : symbol cannot be used in a using-declaration
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(19) : error C2039: 'clock' : is not a member of 'operator``global namespace'''
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(19) : error C2873: 'clock' : symbol cannot be used in a using-declaration
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(19) : error C2039: 'ctime' : is not a member of 'operator``global namespace'''
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(19) : error C2873: 'ctime' : symbol cannot be used in a using-declaration
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(20) : error C2039: 'difftime' : is not a member of 'operator``global namespace'''
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(20) : error C2873: 'difftime' : symbol cannot be used in a using-declaration
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(20) : error C2039: 'gmtime' : is not a member of 'operator``global namespace'''
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(20) : error C2873: 'gmtime' : symbol cannot be used in a using-declaration
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(20) : error C2039: 'localtime' : is not a member of 'operator``global namespace'''
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(20) : error C2873: 'localtime' : symbol cannot be used in a using-declaration
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(21) : error C2039: 'mktime' : is not a member of 'operator``global namespace'''
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(21) : error C2873: 'mktime' : symbol cannot be used in a using-declaration
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(21) : error C2039: 'strftime' : is not a member of 'operator``global namespace'''
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(21) : error C2873: 'strftime' : symbol cannot be used in a using-declaration
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(21) : error C2039: 'time' : is not a member of 'operator``global namespace'''
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ctime(21) : error C2873: 'time' : symbol cannot be used in a using-declaration

so, does anyone know what the problem could be? i dont remember having any errors like this before i stopped working on the game.. thanks for any help.

Share this post


Link to post
Share on other sites
Advertisement
Wild guess... have you got a time.h that could be interfering with the #include<time.h> in ctime?

Maybe you have an error in one of the header files included before ctime which is causing the errors?

Share this post


Link to post
Share on other sites
thanks for your reply.

i actually dont #include time.h or ctime at all in my project. im guessing one of the libraries i use must include it? is that what this error is about? i dont know... thanks for any further help.

Share this post


Link to post
Share on other sites
does anyone have any idea what the problem could be? i've tried starting a new project, and still get the errors. i also tried an old backup from like august, and it compiled with the same errors too... which is strange, ive never gotten these before, and i havent made changes to any of the libraries i dont think...

thanks for any help.

Share this post


Link to post
Share on other sites
i put the same files in the new project as the old one... also, i tried removing "using namespace std" everywhere in my code (which is bad anyway)... i get 930 errors in total (because im not putting std:: anywhere) but i still get these same errors in the ctime file, so its not from 'using namespace std'.....

thanks for any help.

EDIT: also, my level editor seems to compile fine... it uses almost the same libraries as my game, except the game uses Lua and Winsock... i tried commenting out all Lua code and all networking code from the game.. still no compile [sad]...

Share this post


Link to post
Share on other sites
figured it out (thanks to Jingo)... it was because eNet ( a library im using) has a file called time.h. im guessing one of the libraries im using in the game #included time.h, which screwed everything up. thanks again J!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!