Results 1 to 10 of 10

Thread: glut.h

  1. #1
    Guest

    glut.h

    That's the error I got,seems like glut.h is not included but I checked and it is there.
    Can't see where is the problem


    --------------------Configuration: cube - Win32 Debug--------------------
    Linking...
    cube.obj : error LNK2001: unresolved external symbol ___glutInitWithExit@12
    cube.obj : error LNK2001: unresolved external symbol ___glutCreateWindowWithExit@8
    Debug/cube.exe : fatal error LNK1120: 2 unresolved externals
    Error executing link.exe.

    cube.exe - 3 error(s), 0 warning(s)

  2. #2
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Location
    Fort Collins, Colorado
    Posts
    446

    Re: glut.h

    What you've got there is a link error, you need to make sure you've linked to glut32.lib in your project settings if you're using Visual C++.

  3. #3
    Guest

    Re: glut.h

    I've done that but still not working and that is the problem...actually I can't see where the problem is.
    This is how it looks on my computer

    File Location

    gl.h
    glut.h
    glu.h [compiler]\include\gl


    Opengl32.lib
    glut32.lib
    glu32.lib [compiler]\lib


    Opengl32.dll
    glut32.dll
    glu32.dll [system]

  4. #4
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Location
    Fort Collins, Colorado
    Posts
    446

    Re: glut.h

    I'm not very familiar with Glut, but those "WithExit" look kinda funny, and a google search turns up almost no results. Are you following a tutorial for this?

  5. #5
    Guest

    Re: glut.h

    I am but no results... it might be something wrong with glut library??

  6. #6
    Senior Member Regular Contributor
    Join Date
    Nov 2002
    Location
    USA
    Posts
    254

    Re: glut.h

    Your glut.h may be an older version. Another problem is that you may not have 'glut32.dll'. You can download all glut files, including glut32.lib, glut.h, and glut32.dll, "glut-3.7.6-bin.zip" at: http://www.xmission.com/~nate/glut.html

  7. #7
    Guest

    Re: glut.h

    I did this but still no result,...getting a bit desperate

  8. #8
    Senior Member Regular Contributor
    Join Date
    Nov 2002
    Location
    USA
    Posts
    254

    Re: glut.h

    Did you read the readme in the zip and follow the instructions on where to extract the files. If so, when you extract the files, I found out that it makes a folder called "glut-3.7.6-bin" in the folder where you extracted them, which means it did not write over your old existing files. So you will need to go to the designated folder where you extracted the files, go in Nates folder, and copy the file to the correct folder. -Good Luck

  9. #9
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: glut.h

    The order is important:

    #include<windows.h>// try adding this
    #include<GL/gl.h>
    #include<GL/glu.h>
    #include<GL/glut.h>


    Originally posted by Levy74:
    I've done that but still not working and that is the problem...actually I can't see where the problem is.
    This is how it looks on my computer

    File Location

    gl.h
    glut.h
    glu.h [compiler]\include\gl


    Opengl32.lib
    glut32.lib
    glu32.lib [compiler]\lib


    Opengl32.dll
    glut32.dll
    glu32.dll [system]


  10. #10
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: glut.h

    Sounds like this could be a job for

    #define GLUT_DISABLE_ATEXIT_HACK

    Add that before you #include glut.h. I think that's the right #define, anyway.
    Deiussum
    Software Engineer and OpenGL enthusiast

Similar Threads

  1. glut.h not found after installing glut
    By SagoO in forum OpenGL: General
    Replies: 8
    Last Post: 11-13-2010, 08:04 PM
  2. Timers - time.h or GLUT timerfunc? GLUT or SDL..?
    By omdown in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 12-16-2009, 12:27 PM
  3. Using GLUT meshes without GLUT window
    By Dwight in forum OpenGL: General
    Replies: 2
    Last Post: 11-25-2008, 03:06 AM
  4. glut teapot do i need to initialize glut?
    By bansheeogl in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-01-2005, 04:21 AM
  5. Subwindows in GLUT - New section available in the GLUT tutorial
    By Antonio in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 11-13-2000, 10:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean