Here is a short tutorial to create a simple GLUT xcode project using the prototyping UI library AntTweakBar. I expect that you have compiled AntTweakBar as a static libary.
Create an xcode project
Add a target executable
Under the Build settings of your new target (Right-click on the AntTweakBarGLUTStarter target and select Get Info, then choose the Build tab), you need to remove the GCC_PREFIX_HEADER entry.
Link to libraries
Click the “+” sign again and then “Add Other…”. Add your libAntTweakBar.a file. I always copy my external dependencies into a folder called [my xcode project]/external. So mine is located at AntTweakBarGLUTStarter/external/AntTweakBar/lib/libAntTweakBar.a
Add AntTweakBar header
Create a main program
Now you are ready to put whatever you want in your program. I copied the contents from the AntTweakBar GLUT example (TwSimpleGLUT.c) into main.cpp. This works almost as is. Just add at the very top you:
#ifdef __APPLE__ #define _MACOSX #endif
Build and go
Adding an icon
You’ll see in the above screen shot that I have a beautiful dock icon for my app. This is very easy in the current setup.
Make some icon using Photoshop/Gimp whatever you like. I just save the image as a .png file and use http://iconverticons.com/ to convert it to a .icns file.
Once you have the .icns file add it to your project. I made a new folder AntTweakBarGLUTStarter/data and put my icon there: AntTweakBarGLUTStarter/data/AntTweakBarGLUTStarter.icns. So Right-click on AntTweakBarGLUTStarter > Add > Existing File.
Source: The above is largely based off of: http://blog.onesadcookie.com/2007/12/xcodeglut-tutorial.html