I get a problem with gl/glut.h when using xcode

Hello

I'm new to the C programming language

Here I'm trying to #Include <GL/glut.h>

but I get an error saying file not found, but I have added Glut and OpenGl frameworks

So any one can tell me what is the problem?

OS X Mavericks (10.9.3)

Posted on Jun 14, 2014 5:49 PM

Reply
9 replies

Jun 15, 2014 7:34 PM in response to D4rkLord

Glad that helped, Mark actually mentioned changing the include to use GLUT in his first response to you.



how can I know if some thing has changed in the programming language or not?


Good question


I don;t use these libraries in my normal work, I compiled that one program to see if it would work with that change and to see if there were any other problems I might have been able to help you with,


At this point the basic question of using the GLUT and OpenGL frameworks seems answered. For individual problems with specific examples from that site you will need to try to debug it or else search for an answer.


For example in the fifth program by the values X,Y an Z in the enum have been already declared in

#include <GLUT/glsmapint.h>


which is why you get that error message. If you change that enum to

enum {w = 3};


the code compiles and runs, but this isn't really a comfortable fix for this problem.


User uploaded file


Now that you have the basics of how to write and compile using these libraries you will need to familiarize yourself with the usage in OS X.



good luck, looks like interesting work.


regards


Here's a link to OS X specific information about using OpenGl OpenGL Information


Message was edited by: Frank Caggiano - found menu!!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

I get a problem with gl/glut.h when using xcode

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.