|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic |
Last Thread Next Thread ![]() |
| Error in the glut.h |
|
![]() Ligreman Member since: 12/17/2002 |
||||
|
|
||||
| I've this problem. Whenever I include the glut.h library, I get error in this line (of the glut.h): extern _CRTIMP void __cdecl exit(int); //line 146 I've downloaded many times the library, and I've installed the .dll and .lib correctly. But always have the same error. For example, using the tutorials of Nehe's page about Glut. So, what I'm doing wrong? |
||||
|
||||
![]() Zorak Member since: 10/23/2001 From: Sweden |
||||
|
|
||||
| whats the error message? |
||||
|
||||
![]() Ligreman Member since: 12/17/2002 |
||||
|
|
||||
| Uhh sorry, I forgot This is the message: [C++ Error] glut.h(146): E2337 Only one of a set of overloaded functions can be "C" I'm new with C++ so I don't get it all. |
||||
|
||||
![]() Zorak Member since: 10/23/2001 From: Sweden |
||||
|
|
||||
| Are you including the file twice? Do you have a function named exit in your program? Have you included |
||||
|
||||
![]() Fruny Moderator Member since: 11/16/2001 From: Paris, France |
||||
|
|
||||
| glut.h is correct. You're using Visual C++ 7.0, which changed the prototypes for exit and abort (addedd a __declspec(noreturn) - a Microsoft extension, not standard C++. Go read the 'correct' declaration in Edit: Ah, well, here's the code to be substituted in glut.h #if defined(_WIN32) # ifndef GLUT_BUILDING_LIB # if _MSC_VER >= 1200 _CRTIMP __declspec(noreturn) void __cdecl abort(void); _CRTIMP __declspec(noreturn) void __cdecl exit(int); # else _CRTIMP void __cdecl abort(void); _CRTIMP void __cdecl exit(int); # endif # endif #else /* non-Win32 case. */ [ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ] [ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ] [edited by - Fruny on December 17, 2002 8:09:51 AM] |
||||
|
||||
All times are ET (US)![]() |
Last Thread Next Thread ![]() |
|