Thread: Having trouble with openGL

  1. #1
    Registered User
    Join Date
    Aug 2008

    Unhappy Having trouble with openGL

    there is a tut on openGl on this site by a guy called RoD.

    im on lesson 6 but the problem im having is that i try to compile the code on
    this page of his tut openGl tut

    now i have the openGL library for Dev c++ and when i try to complie that code i get this one error which i dont understand

      [Linker error] undefined reference to `gluPerspective@32' 
      ld returned 1 exit status 
     G:\openGL\ [Build Error]  [Project1.exe] Error 1
    can some body plz help me out


  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    The linker needs to know where the libraries are -- for Dev-C++ you would go to Tools -> Compiler Options and, in the linker box, make sure you see "-lopengl32 -lgdi32 -lglu32" and if you use GLUT, you would probably need "-lglut32" as well.

    If you have this in a project, there's a way to change these settings for the project (rather than forever, which is what I have above), but I don't remember that off the top of my head.

  3. #3
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008

  4. #4
    Registered User
    Join Date
    Aug 2008
    ok thnx guys

  5. #5
    Allways learning cs_student's Avatar
    Join Date
    Aug 2008
    May I suggest that you learn to set it up on msvc++ as well. Here is a video tutorial which makes it seem quite easy to set up. linky

    It also has tutorials on how to use openGL with glut (though I do suggest that you use SDL along with openGL instead).


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  2. Trouble with OpenGL - "The Incredible Shrinking Magnolias"
    By RossMills in forum Game Programming
    Replies: 4
    Last Post: 11-14-2004, 09:08 AM
  3. Texture Mapping Trouble With Opengl
    By drdroid in forum Game Programming
    Replies: 9
    Last Post: 06-03-2003, 01:18 PM
  4. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 07:57 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM