your program should either have a main() or a WinMain() but not both. in MSVC, a Win32 App uses WinMain(), whereas a Win32 Console App uses only main(). the console app should be used when using glut. this gives you a controlling terminal while your program is being run.
If you’re just trying to figure out how to build NeHe’s Lesson 1, your code should look exactly how it looks in Lesson 1. When doing a Win32 GUI app, WinMain(…) is the main function. You don’t need a separate main() to call it from.
As stated above, a windows application, be default, begins in WinMain(), not main(). This can be changed in some compilers, but there is no need to change it. Just change the main() function you have in your code now to:
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR CmdLine, int nShowCmd)
Obviously you don’t need to use the same variable names as the code above, but that’s the entry point to any Microsoft Windows application.
If you’re just gonna use main(), then in your project file, you need to declare you’re making a console app, and not a Win32 app. Then you won’t get this error. Don’t know how to do this in Dev-C++ though.