From: Sven P. <Sve...@ae...> - 2009-06-11 08:25:28
|
Am Montag, 8. Juni 2009 09:30:44 schrieb pau...@no...: > The problem manifests itself as a compilation error (see attached). It is > complaining that the arguments for __glutInitWithExit do not match those in > the prototype. > > It's been a while since I used classic GLUT, but I have a dim and distant > memory that it was a problem there too. It seems that there is an > assumption that if you are on Windows you must be using MSVC. > > A simple fix would be changing line 602 from: > > #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) > > to either: > > #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) && > !defined(__WATCOMC__) > > or: > > #if defined(_MSC_VER) && !defined(GLUT_DISABLE_ATEXIT_HACK) OK, now I understand the problem: For some obscure reason, Watcom uses a different, non-standard calling convention for C's "exit" function ("watcall" vs. "cdecl") than all other C runtimes. This leads to a mismatch in our prototype and even more problems in classic GLUT. I think doing this differently is a very, very bad idea from Watcom, so I'm simply disabling the atexit hack for Watcom only, i.e. use the first fix you proposed. The reason for fixing it this way is that we stay as close to original GLUT as possible. I don't know e.g. is the atexit hack is necessary for other development environments/runtimes, e.g. MinGW, so let's be conservative... Anyway, this was no show stopper, so where is our 2.6.0 release? :-( Cheers, S. |