Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding an OpenGL framework in Xcode 4

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?

like image 372
jumana Avatar asked Mar 22 '11 17:03

jumana


People also ask

How do I add Glfw to Xcode?

Install GLFW Download and install Xcode from Mac App Store. Open CMake, click on Browse Source button to select the GLFW folder (make sure that CMakeLists. txt) is located inside that folder. After that, click on Browse Build button and select the newly created Build folder in previous step.


2 Answers


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 :)

like image 80
Temmeh Avatar answered Oct 12 '22 02:10

Temmeh


The easiest way is to go to your project settings, and under Linking -> Other Linking Flags add:

-framework OpenGL
like image 28
Cornstalks Avatar answered Oct 12 '22 01:10

Cornstalks