PDA

View Full Version : Borland Glut compile error, overloaded C



delic
10-16-2002, 05:58 AM
someone please enlighten me on this error if you can:

D:\File Cabinet\Desktop\MTV\PCSrc>bcc32 main.cpp glut32.lib
bcc32 main.cpp glut32.lib

Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
main.cpp:
Error E2337 d:\Borland\Bcc55\include\gl/glut.h 146: Only one of a set of overloaded functions can be "C"
Warning W8057 main.cpp 73: Parameter 'x' is never used in function keyboard(unsigned char,int,int)
Warning W8057 main.cpp 73: Parameter 'y' is never used in function keyboard(unsigned char,int,int)
Warning W8057 main.cpp 87: Parameter 'x' is never used in function arrow_keys(int,int,int)
Warning W8057 main.cpp 87: Parameter 'y' is never used in function arrow_keys(int,int,int)
Warning W8004 main.cpp 110: 'menu' is assigned a value that is never used in function createGLUTMenus()
*** 1 errors in Compile ***

Line 146 in glut.h is the declaratio of the exit() function. It is defining the crt function exit twice..Why?? and how do i fix this..

[This message has been edited by delic (edited 10-16-2002).]

[This message has been edited by delic (edited 10-16-2002).]

delic
10-16-2002, 06:26 AM
WEll as a hack fix I commented out line 146 and renamed glut.h to glutC++.h and renamed the original to glutc.h

Now I have to use two differenct glut.h's depending if the file is .cpp or .c.. It works though..

Anyone with the "real" fix??