xcode 5 deprecation warning about glut functions

2019-01-22 03:52发布

问题:

I just upgrade my mac os x 10.6.8 to 10.9 this morning. Everything goes fine except the Xcode 5 with OpenGL Glut APIs. Whenever I run my program involving glut functions, I got 30 deprecation warns, like:

'gluErrorString' is deprecated: first deprecated in OS X 10.9.
'glutBitmapCharacter' is deprecated: first deprecated in OS X 10.9.
'glutSwapBuffers' is deprecated: first deprecated in OS X 10.9.
'glutDisplayFunc' is deprecated: first deprecated in OS X 10.9.
'glutIdelFunc' is deprecated: first deprecated in OS X 10.9.
...

回答1:

Change "OS X Deployment Target" back to OSX10.8, then it works. Hope they will deal with it soon.



回答2:

I encountered a similar problem with OSX Mavericks.

If the messages are annoying, add compile options to:

-Wno-deprecated