Thread: Enable OpenGL with DevC++

  1. #1
    Registered User
    Join Date
    Aug 2003

    Enable OpenGL with DevC++

    This is how you setup Bloodshed DevC++ v. 4 to work with OpenGL:

    The easy way (with startcode generated):
    Start DevC++.
    File->New Project
    In the dialog that appears go to the tab named Graphics and select the OpenGL template. You are good to go. But if you want to use functions in the glu.h header you need to perform the following:

    Project->Project options
    In the textbox where it says (or should say if you did it correct) -lopengl32 add this: -lglu32
    Just remember to seperate the 2 with a space.

    The hard way (no code generated):
    Start DevC++
    File->New Project
    Select empty project.
    Project->Project options
    Make sure the checkbox where it says "Do not create a console" is checked, if not check it.
    In the textbox where it says "Further object files or linker options" add "-lopengl32 -lglu32" (without the quotationmarks).

    You are now good to go.

  2. #2
    Registered User
    Join Date
    Dec 2004

    Skipped a step...

    To reach that (in, i don't know if this has been changed) you must select the "Parameters" tab to veiw that box. If this is not true for earlier versions, ignore this.

  3. #3
    Registered User
    Join Date
    Jan 2005
    Thanks loads. It works now. Seems so simple.

  4. #4
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Thanks At last I can do it!

  5. #5
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    (in denial) Heh, the rating system didn't die!


    Thanks, nice little tut/article.
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

  6. #6
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Outer Space!
    why won't #pragma comment(lib,...) work in dev-C++?
    what does signature stand for?

  7. #7
    Join Date
    May 2004
    Because pragma has different uses with different compilers.
    #pragma comment(lib,...) will work in MSVC++

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why only 32x32? (OpenGL) [Please help]
    By Queatrix in forum Game Programming
    Replies: 2
    Last Post: 01-23-2006, 02:39 PM
  2. Linking OpenGL in Dev-C++
    By linkofazeroth in forum Game Programming
    Replies: 4
    Last Post: 09-13-2005, 10:17 AM
  3. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 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