nothing like glut.dll or glut.lib. So I cannot run the programs and also when I try to compile them with Visual C++ (VC7, Visual Studio.NET) they compile OK but when I try to build the program it says that:
fatal error LNK1120: 1 unresolved externals
error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartUp
Well, I solved my problem even though I’m not sure how I exactly did that.
I’ve just created a new and empty (!) Win32 Console Application in Visual Studio.NET (Visual C++) pasted the same OpenGL/GLUT code, compiled and built it without any problems! The resultin .exe file ran smoothly without any problems.
Thanks to everyone who spent their times for trying to find out what my problem was in the previous message (still seems a mystery to me).
There are two types of executable projects; Console Application and Application. Application uses a WinMain as entry point in your program, and Console Application uses a main as entry point. Depending on which of these function your code has, main or WinMain, you should create the correct type of project.
So there’s nothing mysterious about it, just some lack of knowledge about your compiler
Originally posted by Bob:
[b]There are two types of executable projects; Console Application and Application. Application uses a WinMain as entry point in your program, and Console Application uses a main as entry point. Depending on which of these function your code has, main or WinMain, you should create the correct type of project.
So there’s nothing mysterious about it, just some lack of knowledge about your compiler [/b]
Well, in my problematic trial the system was trying to produce a Console App, however I should’ve missed something so that it didn’t work, but when I started a new project, made it an EMPTY Console App it compiled and ran smoothly.
For my knowledge about the compiler, you’re definitely right. The last time I’ve done C/C++ coding the mainstream compiler was Turbo C++
If glut.h includes gl.h then why do so many examples start with:
#include <GL/gl.h> #include <GL/glut.h>
and cause the poor compiler trouble with “redefined” stuff?
Is there some deeper reason? Is it different in Linux/UNIX environment? In my Win2000 environment and VC++ I just inclued the glut.h and everything works fine.