PDA

View Full Version : Problem with the glut libraries



11-29-2001, 08:17 PM
Dear all,
I am using the latest borland 5.02 compiler for compilation, I have included all the necessary .lib files in the lib path, but still when I compile and link a piece of code containing 'glutWireFrame' I get a message "unresolved external reference..." to this function. I do not know where the problem is, please help.

email:manju@cranessoftware.com

11-30-2001, 09:56 AM
Are you sure that you have the glut librairies and header files?
Or did you have the last version of glut?

11-30-2001, 10:19 AM
You cannot get new GLUT(over 3.7) work on Borland Compilers(believe me.. I KNOW!!!) 2.5 weeks I have beet trying... It works just well if you code pure C but if you try C++ you are gone... There is stupid Extern "C" in glut.h and no namespace std...
borland compiler doesn't like that...

11-30-2001, 11:11 AM
Yes it's right...I always have problems with librairies with Borland...so to code in OpenGl I use Dev C++...no problem of librairies...
But for Borland Compilers you can convert them into compatible Borland librairies with the implib utility...

dheitbri
12-01-2001, 05:32 PM
to get lib's to work with borland theres 2 command line programs you pretty much have to use. The implib.exe, and coff2omf.exe. If you have a dll you you can use implib to create a .lib file for it, and for coff2omf, you can convert a coff .lib file (coff being what MS uses) to an omf .lib file. Although if you are using borland 5.02, I don't think it comes with coff2omf. Also your compiler might also be looking for glut32.dll. If you do not have this file this is most likely what is causing your problem.

BTW. you can get GLUT 3.7 to work with borland 5.02 I just did it a few weeks back, although if I remember you have to use implib to create a new .lib file from the glut32.dll, and I think I had to take out some uselib statements from the .h file.

[This message has been edited by dheitbri (edited 12-01-2001).]

12-02-2001, 08:25 PM
Originally posted by borlander2.0:
You cannot get new GLUT(over 3.7) work on Borland Compilers(believe me.. I KNOW!!!) 2.5 weeks I have beet trying... It works just well if you code pure C but if you try C++ you are gone... There is stupid Extern "C" in glut.h and no namespace std...
borland compiler doesn't like that...

Dear Borlander2.0,
I have found solution to my problem, according to the directions given by Mr dheitbri I used implib.exe that comes with borland compiler and converted the glut32.dll,glu32.dll and opengl32.dll to their respective .lib files and I included these files in the lib path for my project.Glut now works perfectly fine even under borland compiler, thanks to your reply.