openGl on MS visual C++6

Dear All,
I am using MS visual C++ that contains gl.h, glu.h, glu32.lib, glaux.h, opengl32.lib, glu32.dll, and opengl32.dll at the respective include, lib, windows/system folders. Downloaded and copied to the folders above are glut.h, glut32.lib, glut32.dll, ver3.7.6.

At MS Visual C++:

  1. create empty, win32 application, not using MFC, file and add this to project.
  2. Put at the top:
    #include <windows.h>
    #include <gl/Gl.h>
    #include <gl/glut.h>
    with simple program.
  3. compile - No error
  4. Execute:
    LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
    Debug/3_dots.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.
    3_dots.exe - 2 error(s), 0 warning(s)
  5. Add to object/libraries module list at setting: glu32.lib glut32.lib opengl32.lib
  6. Execute:
    No change: errors as in step4

What was wrong as how to make it right?

Thank you in advance.


[This message has been edited by jovialone (edited 09-07-2002).]

Looks like you created a ‘Win32 application’ project.

In this cases you have to provide a WinMain() function and not a main().

Since you are using Glut you should create a ‘console’ project which only needs a main() function.

You should ask these kind of questions in the developer/beginner forum on this site.

Hope that helps!

Dont forget the winmm.lib

I am sorry I should have been more specific

the winmm.lib should go with the rest of the libs when you link

I usually get the errors you got when
i compile something that was intended to be a console program.
I believe Nothing to be correct