PDA

View Full Version : Glut under Borland C++Builder help



adamnation
10-12-2003, 10:22 AM
Hey,

I a lot of people ask about this, but I'm really stumped. If anybody could help I would be eternally grateful.

I'm trying to get GLUT to work with Borland C++ Builder 5. When I go to build the program I get: (C++ Error) GLUT.H(146): E2337 Only one of a set of overloaded functions can be "C".

Now, I searched the net for a solution to the problem. Following all the information I found I used implib to convert the library, I added the windows.h to my includes, and the converted glut32.lib to my project. However I still get this error. How do I go about remedying this problem?? Is there a better (or at least something that will work both on Borland and VC++) toolkit out there?

marcus256
10-13-2003, 10:10 PM
Your problem is related to glut.h, nothing else. Unfortunately GLUT for Windows is a bit VC centric. I take it you have GLUT 3.7.6 from Nate Robins. In that case lines 145-157 read (your error was at line 146):



# ifndef GLUT_BUILDING_LIB
extern _CRTIMP void __cdecl exit(int);
# endif

Try changing line 145 to:



# if !defined(GLUT_BUILDING_LIB) && !defined(__BORLANDC__)

...and see if that helps (just a guess). Or simply comment out line 146.

By the way, GLFW (http://hem.passagen.se/opengl/glfw) works for Visual C++, Borland C++ Builder, MinGW, Cygwin, LCC-win32 (and soon OpenWatcom), not to mention Linux etc.


[This message has been edited by marcus256 (edited 10-14-2003).]