On May 20, 2005, at 2:55 PM, James Bucanek wrote:
So I wonder why the compiler behaviour changes when I link against and SDK? A quick grep shows that there are a bunch of statements like
#pragma warning ( disable: 4244 )
scattered all over the system headers. I'm wondering if one of those is causing this particular warning to be set in the compiler. Of course, since I can't seem to find any kind of comprehensive list of warning numbers for gcc, I have no idea which one might do that.
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/GLUT.framework/Headers/glsmap.h:#pragma warning (disable:4244) /* Disable bogus conversion warnings. */
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/GLUT.framework/Headers/glut.h:#pragma warning (disable:4244) /* Disable bogus conversion warnings. */
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/GLUT.framework/Headers/glutstroke.h:#pragma warning (disable:4244) /* disable bogus conversion warnings */
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/GLUT.framework/Headers/port.h:#pragma warning (disable:4244) /* disable bogus conversion warnings */
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/GLUT.framework/Versions/A/Headers/glsmap.h:#pragma warning (disable:4244) /* Disable bogus conversion warnings. */
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/GLUT.framework/Versions/A/Headers/glut.h:#pragma warning (disable:4244) /* Disable bogus conversion warnings. */
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/GLUT.framework/Versions/A/Headers/glutstroke.h:#pragma warning (disable:4244) /* disable bogus conversion warnings */
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/GLUT.framework/Versions/A/Headers/port.h:#pragma warning (disable:4244) /* disable bogus conversion warnings */
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/GLUT.framework/Versions/Current/Headers/glsmap.h:#pragma warning (disable:4244) /* Disable bogus conversion warnings. */
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/GLUT.framework/Versions/Current/Headers/glut.h:#pragma warning (disable:4244) /* Disable bogus conversion warnings. */
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/GLUT.framework/Versions/Current/Headers/glutstroke.h:#pragma warning (disable:4244) /* disable bogus conversion warnings */
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/GLUT.framework/Versions/Current/Headers/port.h:#pragma warning (disable:4244) /* disable bogus conversion warnings */
They are not for gcc. I see these wrapped in an #ifdef:
#if defined(_WIN32)
#include <windows.h>
#pragma warning (disable:4244) /* disable bogus conversion warnings */
#endif
So do you have any idea why _WIN32 might be getting defined in your build? There's no place in Apple headers or SDKs where this is defined, and gcc doesn't define this macro.
Chris