Hi,
I recently started developing programs on OS X using C++ on 10.4.8. I'm not moving onto making a few OpenGL applications, but have hit a hurdle before even starting. I was following the OS X Window tutorial on nehe.gamedev.net and copied all the code in directly, and added the required frameworks (GLUT and OpenGL) using the Add - > Existing Frameworks option under Actions. I then try compiling and I get only one error, which is:
Linking
Undefined Symbols:
_DrawGLScene
_InitGL
_ReSizeGLScene
collect2: ld returned 1 exit status
I have tried using both a Carbon Project and a Cocoa project, both with exactly main.c file:
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <GLUT/glut.h>
#define kWindowWidth 400
#define kWindowHeight 300
GLvoid InitGL(GLvoid);
GLvoid DrawGLScene(GLvoid);
GLvoid ReSizeGLScene(int Width, int Height);
int main(int argc, char** argv) {
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize (kWindowWidth, kWindowHeight);
glutCreateWindow(argv[0]);
InitGL();
glutDisplayFunc(DrawGLScene);
glutReshapeFunc(ReSizeGLScene);
glutMainLoop();
return 0;
}
Why does this same error keep appearing? I cannot find a solution to it.
Thanks very much,
Regards, George Buckingham