On Fri, 28 Feb 2003, Daniel Heckenberg wrote:
- Problem: 'for' scoping for VC++ 6.0 isn't compatible with the "new ISO"
style scoping that GCC seems to support/default to.
E.g. for (int i=0; i < i_max; i++) func(i); for (int I=0; i < i_MAX; i++) // causes VC++ redefinition error func2(i);
Short-term Solution: I just removed any variable redefinitions that caused compiler errors under VC++. This may now result in warnings on other platforms. This is undesirable and I don't want to suggest that the code should conform to VC++ non-conformance...
This is not non-conformance, if you find constructs like the ones you mentioned, you have to change them, this is true for all platforms.
int i; for (i=0;...) ...
Long-term Solution: We probably should code to avoid both the VC++ error and the GCC warning.
Definitely.
- Problem: Windows needs to have <windows.h> explicitly included before
many of the "platform independent" GL headers (e.g. gl.h, glu.h etc).
Short-term Solution: I added the #ifdef _WINDOWS etc. inclusion of windows.h wherever it's need... including the "I hate windows, I shouldn't have to do this". Whose immortal words are those, anyway?!
:) this was Mark, probably when he ported from SGI to windows.
Long-term Solution: I'll see if it's easy to add windows.h as a default include somehow so we can avoid pollution of the GEM source. OTOH, this causes a bit of obfuscation and "make" builds would be complicated....
Yes, I think in the long termit is better to make the OS specific #ifdefs only in few places. The best solution would be to have these just in one file.
Guenter