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: unresolved external symbol??--help!

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2001
    Location
    allston Ma
    Posts
    8

    unresolved external symbol??--help!

    Does anyone know anything about these errors? And if so, how do I go about resolving it?? Any suggestions would be great appreciated!!

    unresolved external symbol ___glutInitWithExit@12
    error LNK2001: unresolved external symbol ___glutCreateWindowWithExit@8

  2. #2
    Member Regular Contributor
    Join Date
    Jul 2001
    Posts
    352

    Re: unresolved external symbol??--help!

    This message means that the linker has not managed to link the glut library with your code. If you are using VC++, just specify that you want glut32.lib to be linked. If you are using a Borland compiler, you must know that the standard glut libs are not compatible with borland.

    Hope that helps
    Morglum

  3. #3
    Member Regular Contributor
    Join Date
    May 2000
    Location
    Oxford, England
    Posts
    471

    Re: unresolved external symbol??--help!

    Originally posted by cali:
    unresolved external symbol ___glutInitWithExit@12
    error LNK2001: unresolved external symbol ___glutCreateWindowWithExit@8
    I've seen those before, change the way the app is initialised :

    I reackon your main function looks like :

    void main(void)
    {

    }

    change it to

    void main(int argc, char** argv)
    {
    glutInit(&argc, argv);

    }

    it should now work

  4. #4
    Member Regular Contributor
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    431

    Re: unresolved external symbol??--help!

    Originally posted by Rob The Bloke:
    change it to

    void main(int argc, char** argv)
    {
    glutInit(&argc, argv);

    }
    I'd change your's to:
    Code :
    int main(int argc, char **argv)
    {
    ...
    glutInit(&argc, argv);
    ...
    return 0;
    }
    </nitpick>

Posting Permissions

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