I had trouble understanding how to get openGL so I bought a book with a disk to learn. Since getting interested in game programming, i’ve gone through 4 math texts but have struggled to get through one C++ book. I think its because in math I can do the problems and check my answers, but C++ all I can do is read, I can’t practice. I got OpenGl in hopes that I can learn to make some very simple programs and get some practice using C++. I wrote some pretty complex programs in game maker but the game maker language affords me no real programming practice.
Anyways, like I said I know very little and really don’t know what I’m doing at this point, this makes asking questions kind of difficult, as well as understanding the answers. So please don’t assume I know anything. I’m trying to practice so I can learn.
Anyways, I popped in the Cd and downloaded all sorts of header files, gl, glu, glaux, all kinds of wierd stuff. If I open one it opens on my borland C++ builderX ide.
Anyways, I went in my borland “include” files and found gl.h, glu.h, and glaux.h so I think all the files have been instlled properly.
So I started reading the book and typed in the first program listed to see if it was working. The book didn’t tell me where to enter it so I figred do it in my borland ide. Is that what I’m supposed to do?
Anyways here is the program:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
return 0;
}
It won’t compile. Error: unresolved external ‘_main’ referenced from C:\CBUILDERX\LIB\COX32.OBJ
I rechecked the program for typo’s many times but I think its all correct. Actually the original program printed a message, I removed that part when it wouldn’t work to see if that was the problem, but appearantly its WinMain(). Any idea?