Open Gl

i want to ask, how to compile the example(source code) in open gl programming, i'm using visual c++ 5 and i've also include the gl and opengl library. but it still has error. so what do we need to configure before compile?
by the way i'm new in using vC++.
Who is Participating?
Micke_CapConnect With a Mentor Commented:

Open GL are an functionbased language and thats why it dosent mix very well whith C++. However you must have a main function in OpenGL. OpenGL loops the main and you should have all you calls in it.
Try doing something like this.

Define classes like you use to, and call them from your main function. You will have a nic mix of C, C++ and OpenGL.

The Errorcode "cannot compile cube.exe"
are generated becourse you dont have any main.

Hi eddyhalim,

what errors ?
eddyhalimAuthor Commented:
I think the error is
"cannot find _main"
"cannot compile cube.exe"

actually i just compile a opengl cube.c example but it's  appear error.
All Courses

From novice to tech pro — start learning today.