OpenGL and DevCPP: A dilemma for newbies

This is a discussion on OpenGL and DevCPP: A dilemma for newbies within the Game Programming forums, part of the General Programming Boards category; Greetz ppl! I'm trying to learn OpenGL, and at the same time trying to use it with DevCPP. I am ...

  1. #1
    Registered User Sunny's Avatar
    Join Date
    Nov 2001
    Posts
    101

    OpenGL and DevCPP: A dilemma for newbies

    Greetz ppl!

    I'm trying to learn OpenGL, and at the same time trying to use it with DevCPP. I am discovering what a headache it is....No, i can't install the Borland builder or Visual C++ for objective reasons right now.
    The problem comes to the point where I am required to use Glut.
    ( The GL utility). I have downloaded some libraries from Nate's homesite and they seem to be compatible. Sort of. I haven't figured out which libraries are compatible with DevCPP.
    When I compile I get three errors from the linker, and they all refer to these three long named functinos that have the word 'exit' in it.Something like 'InitWindowWithExit'. The error the linker returns is "undefined reference to 'function'".

    Bsaically, all I want to learn is how to draw a simple object, rotate the object, zoom in and zoom out. I can figure out the rest through logical deduction. I find that it is VERY difficult to do this...with DevCpp...so if anyone out there did not fall asleep reading this, please lend a hand.....



    Stef

  2. #2
    Registered User JoshG's Avatar
    Join Date
    Mar 2002
    Posts
    326
    I think Dev-C++ comes with OpenGL. Look on the Graphics tab when you go to new project.

  3. #3
    Registered User Sunny's Avatar
    Join Date
    Nov 2001
    Posts
    101

    yah

    Yeah, DevCpp does come with OpenGL suppport but it doesn't have any support for the Glut lib...


    But thanks anyways.

    Does anyone know where i can find some good simple tutorials for newbies in learning the Windows API ???

    Stef

  4. #4
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    win32 -> gametutorials.com

    opengl -> http://nehe.gamedev.net/


    there is, also, SDL and allegro (allegro has been really good for me for 2D purposes)

    allegro -> allegro.cc

  5. #5
    Registered User Sunny's Avatar
    Join Date
    Nov 2001
    Posts
    101

    Yeppers

    Yeah, I heard about allegro...But before starting on with that I think I should learn the Windows API, which I am very Reluctant...
    And, of course, I also liked Nehe's tutorial. Except for the last one which deals with rotations. I copied the source as is and all i get after compiling is a big empty black window. :P

    C' est la vi...

    In the mean time, I'll be working on my Open Source project:
    http://www.angelfire.com/my/bahairomania/freegui.html
    Discover the XBlue..

    c ya

  6. #6
    Registered User
    Join Date
    May 2002
    Posts
    208
    sumhow I lost my OpenGL thingy in Dev C++
    Tnly options I have now for progects are Allegro console and windows.
    I guess it doesn't matter anyhow cause I don't want to program openGL at the moment I am sticking to 2D with allegro
    Jeff Paddon
    Undergraduate Research Assistant
    Physics Department
    St. Francis Xavier University

  7. #7
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,267
    your not linking to a library,

    did you link to the glut .lib file?
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  8. #8
    Registered User Sunny's Avatar
    Join Date
    Nov 2001
    Posts
    101

    Red face ....

    Yes yes...I am linking to the glut.lib, but whenever I include the header ( glut.h ) and compiler, I get three error messages refering to these three different functions (they had really long names, but all the names contained the word 'exit') saying something like 'undefined reference'. So, basically that's it. And, I was worried, because a lot of these tutorials ask for the glut.lib. Except for Nehe, but like I sayd, I have big problems with the Translatef(....)
    function and it always gives me pitch black, allthough the code is exactly as described by the tutorial...



    Thank you guys anyways...

    Have Fun guys....!!

  9. #9
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,267
    well first include windows.h above glut.h see if that works out, you also must be linking to OpenGL32.lib and Glu32.lib, or if your using the sgi libs, OpenGL.lib and Glu.lib.
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  10. #10
    Registered User Sunny's Avatar
    Join Date
    Nov 2001
    Posts
    101

    ThankuThankuThanku

    Thanks a lot ppl. Great help. I've decided to go on without fussing so much about the glut. I see it's not such an important component. I'm really having fun. Spent the whole week just foing OpenGL, allthough i still can't stand the Windows API....

    Many thanks once more....


    Sunny

  11. #11
    Registered User
    Join Date
    Apr 2005
    Posts
    1

    Lightbulb

    I've just have the same problem, but fighting with the tool arrive to a solution, you must have this in the linker parameter/options
    -lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32
    in the -lwinmm -lgdi32 are defined all unresolved references mentioned by the linker.
    I hope this help you. Sorry for my english, i'm from Argentina and we still speak spanish

  12. #12
    Registered User
    Join Date
    Mar 2003
    Posts
    580
    Somebody should make a sticky as to how to setup OpenGL in bloodshed devcpp as I see a new thread about it every week. I personally don't know how to (nor do I usually read the threads) because I use vs.
    See you in 13

  13. #13
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,533
    > 07-10-2002, 04:22 AM
    > Today, 04:04 PM
    Try not bumping threads which are old (it's in the rules, you've read them I'm sure).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. openGL
    By red_Marvin in forum C++ Programming
    Replies: 10
    Last Post: 03-21-2003, 03:44 PM

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