-
trying to build app using glut
I downloaded a nehe demo and tried to build under Mac OS 10.4 (intel)
I'm building using g++ 4.0.1, and since the demo used code warrior, and had no makefile, I have no idea what it did, but since I know how to build on Linux and Windows, I figured it should be easy....
The problem is, despite having something called GLUT.Framework loaded on the system, I don't seem to have a glut library to link to. I searched, and there is no libglut.a, or libglut.dylib that I can see. I did find GL, but I'm still getting undefined symbols _glutMainLoop, etc. Can anyone explain what I'm doing wrong?
Here's the makefile I put together:
INC=-I/usr/X11R6/include/GL -I/usr/X11R6/include -I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/GLUT.framework/Versions/A/Headers/
LIB=-L/usr/X11R6/lib -lGL
lesson05: main.c
gcc -g $(INC) main.c $(LIB)
-
Advanced Member
Frequent Contributor
Re: trying to build app using glut
Forget everything you know about X11.
gcc main.c -framework OpenGL -framework GLUT
and change
#include <GL/gl.h>
#include <GL/glut.h>
to
#include <OpenGL/gl.h>
#include <GLUT/glut.h>
-
Re: trying to build app using glut
Thanks, that's just the ticket!
-
Junior Member
Regular Contributor
Re: trying to build app using glut
Have you tried downloading the Cocoa sourcecode for any of the projects?
I'm interested in trying some of the Nehe OpenGL tutorials myself (with a view to possibly translating some of them into plugins for Quartz Composer). I have a lot to learn before I get to that stage, however.
alx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules