Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Newbie Can't Compile

  1. #1
    Guest

    Newbie Can't Compile

    Hi, I am trying my hand at OpenGL on OS X
    10.1 and cannot get a compile to work. I've
    had limited experience on Linux with OpenGL but have decided to focus my efforts on OS X.

    Here is my compile line:
    cc -framework OpenGL -framework GLUT -lobjc test.c

    and here is the result which I cannot figure
    out how to eliminate:

    /usr/bin/ld: Undefined symbols:
    _glutInitMac

    I have looked at the SDK download from
    Apple and in the framework folders but
    am unable to figure anything out from
    that.

    Any help would be appreciated very much!
    Mak

  2. #2
    Guest

    Re: Newbie Can't Compile

    I had no problem compiling the hello.c program from the "lego" OpenGL book with your compile line. I did this under both OS 10.1.1 and 10.1.2.

    Perhaps if you posted your program, more insight as to the problem might be gained.

    Vik

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Dec 2001
    Location
    Wellington, New Zealand
    Posts
    548

    Re: Newbie Can't Compile

    Looks like you are using the headers from the OpenGL 1.2.1 SDK. Those headers are for MacOS <= 9, not MacOSX. All the headers and libraries you need are included with MacOSX and/or the developer tools.

    You may need to change your includes to <GLUT/glut.h> and <OpenGL/gl.h> to fix the problem.

  4. #4
    Guest

    Re: Newbie Can't Compile

    OneSadCookie: Thank you very much for
    your response. That was exactly it, wrong included header directory. Thanks again for all the responses from everyone!

    mak


    Originally posted by OneSadCookie:
    Looks like you are using the headers from the OpenGL 1.2.1 SDK. Those headers are for MacOS <= 9, not MacOSX. All the headers and libraries you need are included with MacOSX and/or the developer tools.

    You may need to change your includes to <GLUT/glut.h> and <OpenGL/gl.h> to fix the problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •