PDA

View Full Version : Error in GLUT.h?/opengl32.lib?



03-09-2002, 06:36 AM
Heya guys!

I just downladed all the GLUT-stuff files, copied them into the appropriate folders and used the Borland BCC32 to compile my program.
Anyway, I get the following error message:

Borland C++ 5.3 for Win32 Copyright (c) 1993, 1998 Borland International
C:\Eigene Dateien\Mathe\4Cubus.cpp:
Error C:\Programme\Borland\CBuilder3\INCLUDE\gl\glut.h 146: Only one of a set of overloaded functions can be "C"

OK, then I edit the GLUT.h a bit and kick out the

extern C {

line and the } at the end. It says whil linking:

Turbo Incremental Link 3.0 Copyright (c) 1997, 1998 Borland International
Error: Unable to open file 'GLU32.LIB'
Error: Unable to open file 'OPENGL32.LIB'
Error: Unable to open file 'WINMM.LIB'

Well, I noticed that i actually didnt have these files. So where do I get them? And why the heck is the GLUT.h-file bugged? Or is it not and I have made some mistake? The program is alright, it runs fine at my friend's.
So, any suggestions?

gen_zwiebel

Bob
03-09-2002, 09:22 AM
I believe there's a utility called implib, or something similar, for Borland Compilers, used to create import libraries for DLL-files. Use that one to create import libraries for the three missing files. The corresponding DLL-files are called the same as the library files in the error messages, but with a .DLL extension, and should be in the system directory of your Windows installation folder.

zeckensack
03-09-2002, 10:05 AM
The extern "C" stuff is required as OpenGL uses the C calling convention and will break apart when you try to treat it as C++. The error you get means that you somehow managed to redefine some of the OpenGL functions with different parameter lists. This function overloading is illegal in C.

For the latest versions of the libs, have a look at the Glut for Win32 page (http://www.xmission.com/~nate/glut.html) and also check out the Borland notes in the readme (http://www.xmission.com/~nate/glut/README-win32.txt) .



[This message has been edited by zeckensack (edited 03-09-2002).]

kevin_405
03-11-2002, 10:43 AM
Well all are partial solutions.

You probably have a newer version of glut.h which you are trying to compile against older version of source.

The new glut.h combines both windows.h and gu.h.

So uncomment those 2 includes .

Do the implib to generate bcc55 version of glut32.lib

Next do the compile it should work fine.