I'm using Xcode 4 for my C++ programming. I want to add a framework, specifically an OpenGL framework, and I'm not quite used to where things are yet. It says in the help documentation that I should select the target, and from there I get the summery pane where I can add a linked framework/library. When I do that, the summery pane doesn't show up. It does show up when my target is a cocoa application, but since I'm programming in C++, I choose the command line tool, and select the language from there. So, how exactly do I add the OpenGL framework to my target?
Asked
Active
Viewed 1.0k times
3 Answers
13
maybe go under "build phases" (instead of "summary") and then click "Link Binary With Libraries" and add button then search OpenGL.framework im not sure 100%, im new to this too :)

Temmeh
- 168
- 1
- 8
-
The Summary tab doesn't always show up as it's more of a "Cocoa convenience". You're correct that the Link... build phase under the Build Phases tab is the place to look as the linked libraries group of the Summary tab is effectively the same thing. – Joshua Nozzi Mar 23 '11 at 13:44
2
The easiest way is to go to your project settings, and under Linking -> Other Linking Flags
add:
-framework OpenGL

Cornstalks
- 37,137
- 18
- 79
- 144
0
In your project, create a group 'frameworks' (not really necessary but keeps things organized)
With Finder goto: /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks
Locate the OpenGL.framework folder Drag and drop the folder into your XCode project (in the frameworks group) Don't copy the files(!)
Probably you want to copy 'GLUT.framework' as well.

Bruno
- 36
- 1