iDevGames Forums
Errors With NeHe OpenGL Guide - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Errors With NeHe OpenGL Guide (/thread-777.html)



Errors With NeHe OpenGL Guide - SamGray - Sep 6, 2009 11:26 AM

I just got done reading the book "Learn C on the Mac" and I feel like I've got allot of the C concepts down, and now I'm trying to learn OpenGL so I can start making a simple little game...So I found NeHe's guides and started trying to use them in Xcode, but so far I've only gotten errors.

Here is my code:
Code:
#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);
    glutInitWindowPosition (100, 100);
    glutCreateWindow (argv[0]);
    
    InitGL();
    
    glutDisplayFunc(DrawGLScene);
    glutReshapeFunc(ReSizeGLScene);
    
    glutMainLoop();
    
    return 0;
}

There errors I'm getting are in the following image taken right after I tried compling the code above.

[Image: Screenshot2009-09-06at12405PM.png]

I copied and pasted the code from the tutorial at(http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=Mac_OS_X) so I know it wasn't because I just typed something wrong...

Could someone please tell me what I'm doing wrong? I am using Xcode 3.2 and Snow Leopard.

If you need any other details just tell me, I'll be glad to give me, and thank you in advance...


Errors With NeHe OpenGL Guide - AnotherJake - Sep 6, 2009 02:36 PM

When it says "symbols not found" that means there is no function defined for those functions. The only function I see defined in your snippet is main().