Programming with OpenGL (GLUT) on Borland C++ 5.02

 

 

All over the net, I found only three pages that explain how we can use OpenGL with Borland C++ 5.02.

That’s for I create this page, please if you found any error on this page report me it.

An other problem you can encounter on this page is my English !! I’m sorry.

 

The stages to use OpenGL on Borland C++ 5.02

 

The first thing you need to do is to find the OpenGL headers, lib and dll: opengl.exe (522k)

 

This file contain all the dll, lib, headers need to compile a program with OpenGL and the GLUT functions, but may contain others files which aren’t needs, I have never attempt to suppress some of them to see what that cause.

If you made this test please tell me what are the files which I can suppress of the compressed file opengl.exe

 

Decompress this file in a temporary location, and copy the files in the bc5.02 folder in the corresponding sub-folders of your Borland C++ 5.0 folder. Then execute install.bat or copy the dlls in you system32 folder (which is in your win folder).

 

If you use Win95, you need to recompile the libraries, to do that execute lib.bat, or do :

impdef opengl32.def opengl32.dll

implib opengl32.lib opengl32.def

del opengl32.def

implib glu32.lib glu32.dll

 

When you have copied all the files in the goods folders (the same as in my file),

the last thing to do is to make a project and to add to it the file glut32.lib.

To do that, open the project window and add a node to the main .exe file.

 

 

 

Now you can program with OpenGL (in theory).

 

Some problems you may encounter when compiling:

-         When I compile I see this error: Multiple Declaration for ‘WINGDIAPI’

You have include gl.h but haven’t include wing.h

 

-         When I compile I see an error of this type:

Error:  Error: Unresolved external 'glutSwapBuffers' referenced from D:\SAUVEGARDE\BC5\3D\001.OBJ

Error:  Error: Unresolved external 'glutPostRedisplay' referenced from D:\SAUVEGARDE\BC5\3D\001.OBJ

Error:  Error: Unresolved external 'glutIdleFunc' referenced from D:\SAUVEGARDE\BC5\3D\001.OBJ

Error:  Error: Unresolved external 'glutInit' referenced from D:\SAUVEGARDE\BC5\3D\001.OBJ

Error:  Error: Unresolved external 'glutInitDisplayMode' referenced from D:\SAUVEGARDE\BC5\3D\001.OBJ

Error:  Error: Unresolved external 'glutInitWindowSize' referenced from D:\SAUVEGARDE\BC5\3D\001.OBJ

Error:  Error: Unresolved external 'glutInitWindowPosition' referenced from D:\SAUVEGARDE\BC5\3D\001.OBJ

Error:  Error: Unresolved external 'glutCreateWindow' referenced from D:\SAUVEGARDE\BC5\3D\001.OBJ

Error:  Error: Unresolved external 'glutDisplayFunc' referenced from D:\SAUVEGARDE\BC5\3D\001.OBJ

Error:  Error: Unresolved external 'glutReshapeFunc' referenced from D:\SAUVEGARDE\BC5\3D\001.OBJ

Error:  Error: Unresolved external 'glutMouseFunc' referenced from D:\SAUVEGARDE\BC5\3D\001.OBJ

Error:  Error: Unresolved external 'glutMainLoop' referenced from D:\SAUVEGARDE\BC5\3D\001.OBJ

It’s because you haven’t add glut32.lib to your project

 

 

If you have other problems you can send me an email at toto.themud@free.fr

 

An example to be sure of the good fonctionement: test.cpp

 

 

Using GLUT:

 

If you haven’t any guide to learn using OpenGL, I recommend you a book: OpenGL 1.2 distributed by CampusPress

 

 

Links to other sites:

 

OpenGL with Borland C++ 5.02:

http://www.gnt.net/~heiman/opengl.htm

http://ucsub.colorado.edu/~macklem/borland.html&query=OpenGL+Borland+5.02+C++&rsource=LCOSWF

 

3D Stereovision:

http://astronomy.swin.edu.au/pbourke/opengl/stereogl/

 

GLUT 3.7:

http://www.xmission.com/~nate/glut/glut-3.7.3-src.zip

Contain source code and examples to use the GLUT Tool Kit 3.7

http://www.xmission.com/~nate/glut/glut-3.7.3-dlls.zip

Contain only headers, dlls and libraries (all you need to start with GLUT)