Opengl Error

This is a discussion on Opengl Error within the Game Programming forums, part of the General Programming Boards category; PLease help me, I am trying to compile and run a OpenGL project using Dev C++ and when I compile ...

  1. #1
    Registered User
    Join Date
    Jun 2004
    Posts
    3

    Opengl Error

    PLease help me, I am trying to compile and run a OpenGL project using Dev C++ and when I compile I get these errors:


    [Linker error] undefined reference to `__glutInitWithExit@12'

    [Linker error] undefined reference to `__glutCreateWindowWithExit@8'

    [Linker error] undefined reference to `__glutCreateMenuWithExit@8'

    What should I do?

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    1,205
    You need to link with the glut32.lib library in order to use glut.

  3. #3
    Registered User
    Join Date
    Jun 2004
    Posts
    3
    I already did that;

    -lglut32

    and I still get the error.

  4. #4
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  5. #5
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    i assume your #include(ing) <GL/glut.h>

  6. #6
    Registered User
    Join Date
    Jun 2004
    Posts
    3
    Thanks for your help, I was including glut.h

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  3. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 04:45 PM
  4. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 01:53 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 12:10 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21