xcode 5 deprecation warning about glut functions
21,650
Solution 1
Change "OS X Deployment Target" back to OSX10.8, then it works. Hope they will deal with it soon.
Solution 2
I encountered a similar problem with OSX Mavericks.
If the messages are annoying, add compile options to:
-Wno-deprecated
Related videos on Youtube
Author by
make217
Updated on July 09, 2022Comments
-
make217 almost 2 years
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. ...
-
genpfault over 10 years
gluErrorString()
isn't a GLUT function. -
Solaraeus over 10 yearsThe warnings appear to be showing up for all GLUT and GLU functions. I am also seeing warnings on gluPerspective for example.
-
-
make217 over 10 yearsIt works! Thank you very much! But I still have no idea about the reason. A bug or a recommendation to use some sophisticated way to utilize OpenGL APIs? There must exist distinct features under the 10.9 architecture.
-
make217 over 10 yearsThis option I have used before, however, this may hide some information I should know. But still thanks for you reply!
-
Admin over 10 yearsYes, hiding all warnings is of course not a good way. How about trying other libraries? (eg.GLFW)
-
RnMss over 10 years@akihiko : GLFW is a alternative to GLUT, but since Mavericks they also deprecate GLU functions, and I haven't found a replacement provided.
-
Ramy Al Zuhouri over 10 yearsThey're deprecated functions, but the documentation doesn't say which functions to use instead.
-
Kahin over 9 yearsHow do you change it back? Because I have this in my CMakeList.txt: if( APPLE ) set(CMAKE_OSX_ARCHITECTURES "x86_64") if(CMAKE_GENERATOR STREQUAL Xcode) set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8") endif() endif() And it still gives me those warnings..
-
evandrix over 8 yearsalternatively, try
-Wno-deprecated-declarations
instead