22

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
  • 51,148
  • 11
  • 85
  • 139
make217
  • 231
  • 1
  • 2
  • 3

2 Answers2

11

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

akika126
  • 111
  • 2
  • 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 Oct 27 '13 at 00:47
  • 4
    They're deprecated functions, but the documentation doesn't say which functions to use instead. – Ramy Al Zuhouri Nov 11 '13 at 11:22
  • 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.. – Kahin Feb 07 '15 at 08:30
9

I encountered a similar problem with OSX Mavericks.

If the messages are annoying, add compile options to:

-Wno-deprecated
evandrix
  • 6,041
  • 4
  • 27
  • 38
  • 1
    This option I have used before, however, this may hide some information I should know. But still thanks for you reply! – make217 Oct 27 '13 at 00:53
  • 1
    Yes, hiding all warnings is of course not a good way. How about trying other libraries? (eg.GLFW) –  Oct 27 '13 at 20:07
  • @akihiko : GLFW is a alternative to GLUT, but since Mavericks they also deprecate GLU functions, and I haven't found a replacement provided. – RnMss Nov 04 '13 at 06:18
  • 1
    alternatively, try `-Wno-deprecated-declarations` instead – evandrix Nov 29 '15 at 16:05