views:

59

answers:

2

I'm kind of confused here. Im using a mac trying to develop an opengl game. The Opengl frame work is dynamically linked. So therefore i need to force static or bundle it right? Wait, wait, i read that opengl is on all macs now, yet there's extra stuff u get if u install Xcode.(i have it installed).

Anyways, I want this to work on OSX, without them having to install any libraries. Theres what im including:

# include <stdlib.h>
# include <stdio.h>
# include <math.h>
# include <GLUT/glut.h>

and when i compile i link to opengl and glut: -framework OpenGL -framework GLUT
and I'm doing this all in C instead of Objective-C cause I hate learning objects and learning new syntax
So what do i need to do. (otool says i link to them does that mean i need to bundle it?)

If you want to help me more but there is not enough information please email at [email protected] All help is greatly appreciated, you all now how frustrating programming can be.

A: 

I know nothing about macs or xcode or any of that, but you could probably just distribute the required framework shared object files with your application. Alternatively, if there's a static library version of the framework, you could link with that.

atis
I can't force static with the -static option on opengl. And last time i tried to distribute it with the application, i could never get the program to find the library, even tho i used the install tool stuff thats supposed to change where it looks for it.
Patrick Riordan
A: 

All Macs (well, in the last 10 years anyhow) include OpenGL as a standard framework.

All you need to do is add the /System/Library/Frameworks/OpenGL.framework to your project. When your application is run on someone else's Mac, it will look in that same location for the framework, and it will find it since it's included on all Macs.

Wade Williams
o cool thanks, So when im linking to Glut too is that also covered or do i have to deal with that?
Patrick Riordan
GLUT is also a standard system framework.
Wade Williams