Not sure what is going on here, but I have tried to compile two different simple GLUT examples on my mac with Project Builder.
I get this link error:
/usr/bin/ld: /usr/lib/crt1.o illegal reference to symbol: __objcInit defined in indirectly referenced dynamic library /usr/lib/libobjc.A.dylib
I have included the GLUT and OpenGL frameworks.
Any help is greatly appreciated.
Here is the code for one of those:
// Sample GLUT Program
//
#include <iostream.h>
#include <stdlib.h>
#include <GLUT/glut.h>
#include <math.h>
int height, width;
static int xOrg = 0, yOrg = 0;
// Main
int main(int ac, char** av) {
int winSizeX, winSizeY;
if(ac == 3) {
winSizeX = atoi(av[1]);
winSizeY = atoi(av[2]);
}
else { // default window size
winSizeX = 400;
winSizeY = 300;
}
width = winSizeX;
height = winSizeY;
// initialize OpenGL utility toolkit (glut)
glutInit(&ac, av);
// single disply and RGB color mapping
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); // set display mode
glutInitWindowSize(winSizeX, winSizeY); // set window size
glutInitWindowPosition(0, 0); // set window position on screen
glutCreateWindow(“Sample Lab Window”); // set window title
// set background color
glClearColor(0.0, 0.0, 0.0, 0.0); // set the background to black
glClear(GL_COLOR_BUFFER_BIT); // clear the buffer
// enter the infinite main loop
glutMainLoop();
return 0; // never reached
}