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
Share:
21,650

Related videos on Youtube

make217
Author by

make217

Updated on July 09, 2022

Comments

  • make217
    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
      genpfault over 10 years
      gluErrorString() isn't a GLUT function.
    • Solaraeus
      Solaraeus over 10 years
      The warnings appear to be showing up for all GLUT and GLU functions. I am also seeing warnings on gluPerspective for example.
  • make217
    make217 over 10 years
    It 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
    make217 over 10 years
    This option I have used before, however, this may hide some information I should know. But still thanks for you reply!
  • Admin
    Admin over 10 years
    Yes, hiding all warnings is of course not a good way. How about trying other libraries? (eg.GLFW)
  • RnMss
    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
    Ramy Al Zuhouri over 10 years
    They're deprecated functions, but the documentation doesn't say which functions to use instead.
  • Kahin
    Kahin over 9 years
    How 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
    evandrix over 8 years
    alternatively, try -Wno-deprecated-declarations instead