Problems Drawing OpenGL to the Client Area

This is a discussion on Problems Drawing OpenGL to the Client Area within the Windows Programming forums, part of the Platform Specific Boards category; I'm a bit new to this, but I'm learning more stuff everyday, so bear with me. I've been working on ...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    4

    Problems Drawing OpenGL to the Client Area

    I'm a bit new to this, but I'm learning more stuff everyday, so bear with me.

    I've been working on trying to draw OpenGL to the client area. I've worked around most of the errors, but I keep getting linker error warnings from my compilier whenever I try to compile the program.

    Here's an examples of the error message(Dev-C++):

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

    I get a warning like that for every GL function I call.

    The answer is probably right in front of me, but does anyone have any idea what I'm missing here?

  2. #2
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Include the lib opengl32.lib
    At least that's what it is for MSVC++.

  3. #3
    Registered User
    Join Date
    Oct 2002
    Posts
    4
    Thanks, that helped a lot!

    I also had to link to the glu32.lib file to get it to work. I don't know why though.

  4. #4
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    I know pragmas are implementation defined, but I'm pretty sure you can also put something like this in your main source file to include the libs instead of doing it through project settings... that way, if you use the source file in another project the libs are already included.

    #pragma comment(lib, "opengl32.lib")
    #pragma comment(lib, "glu32.lib")

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Drawing two or more rectangles on client area.. HELP!
    By csonx_p in forum Windows Programming
    Replies: 2
    Last Post: 05-12-2008, 02:43 AM
  2. Why only 32x32? (OpenGL) [Please help]
    By Queatrix in forum Game Programming
    Replies: 2
    Last Post: 01-23-2006, 02:39 PM
  3. Need some help drawing a cylinder in openGL
    By InvariantLoop in forum Game Programming
    Replies: 4
    Last Post: 10-25-2005, 03:19 AM
  4. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 01:34 PM
  5. OPENGL noo--bee, fullscreen problems
    By Shadow12345 in forum Game Programming
    Replies: 2
    Last Post: 08-13-2002, 02:53 PM

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