Thread: Glut

  1. #1
    Master n00b Matty_Alan's Avatar
    Join Date
    Jun 2007
    Location
    Bloody Australia Mate!
    Posts
    96

    Glut

    Iv'e started using glut, well actually thats a lie because i can't get it working iv'e just started woking with openGL in the last few days and i'm still much a novice, it's a bit of a steep learning curve.

    Anyways iv'e downloaded the GLUT pack but I dont know how too add it to a project or if I have installed it correctly because when i add it too a file it dosn't do much except come up with errors and it's not the code im using that has errors

    I am aware that when using opengl you have to add the -lopengl32 to the project options, is there one for the glut pack ass well?

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Compiler, OS? Assuming it's linux and GCC, you need to link against the glut libraries also

    -lglut

    And include the glut headers, gl/glut.h or glut.h depending on where you've installed it. Be more specific, what errors?
    Don't forget you'll also need the glut runtime libraries!

    Also, what part of Victoria are you from?

  3. #3
    Master n00b Matty_Alan's Avatar
    Join Date
    Jun 2007
    Location
    Bloody Australia Mate!
    Posts
    96
    Win Xp, Dev C++, Frankston

    And I put the glut.lib file into the libary folder the dll to put in windows\system and the glut.h in include\gl
    Last edited by Matty_Alan; 07-16-2007 at 06:06 AM.

  4. #4
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Okay, once you've installed glut (the libraries, headers)
    Then you'll need to link against glut.lib (may be called glut32.lib), and include glut.h (or gl/glut.h).

    If you get errors, post them here - guessing is hard and not worth it.

    Bah, Frankston. Almost bed time too!

  5. #5
    Master n00b Matty_Alan's Avatar
    Join Date
    Jun 2007
    Location
    Bloody Australia Mate!
    Posts
    96
    The Errors I'm getting are:

    Linker Errors:
    g++: c:/documents and settings/matty alan/desktop/glut test/untitled1.o: No such file or directory
    g++: file path prefix `C:\DEV-C_~1\Bin\' never used



    1 c:/documents and settings/matty alan/desktop/glut test/untitled1.cpp
    C:\DEV-C_~1\Include\gl\gl.h:1135: syntax error before `void'

    1136 c:\dev-c_~1\include\gl\gl.h
    syntax error before `void'


    1137 c:\dev-c_~1\include\gl\gl.h
    syntax error before `APIENTRY'

    1153 c:\dev-c_~1\include\gl\gl.h
    syntax error before `void' <--- theres about 20 of these all on different lines


    Where abouts are you in Vic

    what do you mean about 'link against'
    Last edited by Matty_Alan; 07-16-2007 at 06:26 AM.

  6. #6
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Post your code here, or do a pastebin (google pastebin if you don't know what it means)...

    Link against just means to link with.

    I'm in Brighton.

  7. #7
    Master n00b Matty_Alan's Avatar
    Join Date
    Jun 2007
    Location
    Bloody Australia Mate!
    Posts
    96
    If this is what you mean:

    http://pastebin.com/m7ae17b84

  8. #8
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Try putting it in a directory whose names don't contain spaces.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to get relative mouse coordinates when GLUT return absolute
    By joeprogrammer in forum Game Programming
    Replies: 14
    Last Post: 02-10-2009, 06:35 PM
  2. Running into trouble with GLUT.
    By Josh@Dreamland in forum C++ Programming
    Replies: 4
    Last Post: 12-29-2007, 09:32 PM
  3. Displaying my glut output in my own class window.
    By Queatrix in forum Windows Programming
    Replies: 0
    Last Post: 10-19-2005, 10:09 AM
  4. GLUT and Dev-CPP
    By Canadian_coder in forum Game Programming
    Replies: 4
    Last Post: 12-22-2004, 03:12 AM
  5. Dis/Advantages of Glut?
    By Zeusbwr in forum Game Programming
    Replies: 1
    Last Post: 11-28-2004, 10:00 PM