starting opengl

This is a discussion on starting opengl within the Game Programming forums, part of the General Programming Boards category; I'm having a little trouble getting opengl to work with visual c++ 6.0. I made sure to link the correct ...

  1. #1
    Registered User
    Join Date
    Nov 2004
    Posts
    2

    starting opengl

    I'm having a little trouble getting opengl to work with visual c++ 6.0. I made sure to link the correct files under project->settings. I also went checked through the folders and made sure all the libraries and header files were in place. But, whenever I compile something short like:
    Code:
    #include <windows.h>		// Header File For Windows
    #include <gl\gl.h>			// Header File For The OpenGL32 Library
    #include <gl\glu.h>			// Header File For The GLu32 Library
    #include <gl\glaux.h>		// Header File For The Glaux Library
    I get the errors:
    LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16

    Debug/opengl test.exe : fatal error LNK1120: 1 unresolved externals

    Anyone have any idea what these errors mean? I tried searching for them, but came up with nothing.

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Did you create a new windows application? (as opposed to a console app)

  3. #3
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    I think this means that the compiler is looking for int main and instead finds WinMain. Double check that you aren't making a console project.

  4. #4
    Registered User
    Join Date
    Nov 2004
    Posts
    2
    Oh, thanks, its working now. I had selected win32 app, but had chosen to load an empty project and didn't have any winmain.

    Thanks again.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 08:14 AM
  2. Linking OpenGL in Dev-C++
    By linkofazeroth in forum Game Programming
    Replies: 4
    Last Post: 09-13-2005, 11:17 AM
  3. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 01: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

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