Original Post
Hello! I'm a student learning to be a programmer. I have aspirations in joining the game industry some day, and figured that learning OpenGL as early as I could would benefit me greatly. I came across NeHe in my search for a tutorial, and I'm interested in using them. However, when attempting to do lesson 1 to be sure everything was working well enough for me to begin to learn, I came across a problem. When attempting to build and run the program, it told me the following: (X)Undefined symbols: _DrawGLScene _InitGL _ReSizeGlScene _glutResizeFunc collect2: Id returned 1 exit status It seems like there is a header file missing, or a mistype of the functions (the latter of which I'm doubting). I have searched around, but was unable to find an answer elsewhere. Also the code was pretty much an exact copy that was provided in the NeHe tutorial. It is as follows Source: Lesson: Mac OS X I am pretty decent with the C language (currently making my first version of a raytracing program for a class), to just give some background information. Also, I am running Mac OS X 10.4 Tiger and, as said in the subject, using XCode 2.2. Any information that can be given is greatly appreciated. Thank you very much for your time!
#include <OpenGL/gl.h> // Header File For The OpenGL32 Library
#include <OpenGL/glu.h> // Header File For The GLu32 Library
#include <GLUT/glut.h> // Header File For The GLut Library
#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);
glutInitWindowPosition (100, 100);
glutCreateWindow (argv[0]);
InitGL();
glutDisplayFunc(DrawGLScene);
glutReshapeFunc(ReSizeGLScene);
glutMainLoop();
return 0;
}