Re: [osg-users] INT32 redeifinition with Win32 and VS8 binary package
Hello Andrew, > It appears that the VS8 binary package for osg2.2.0 has a problem in > one of the 3rd party header files included. (jmorecfg.h) > Compiling against it causes an error regarding redefinition of INT32. [...] > in jmorecfg.h: > > #ifndef XMD_H > typedef long INT32; > #endif > > is changed to: > > #if !defined( XMD_H ) && !defined( WIN32 ) > typedef long INT32; > #endif I just checked, and on my systems, the first block of code is in jmorecfg.h (*no* include guard for WIN32), yet I never got the redefinition warning. I'm using both Windows XP and Vista, with both VC++ 2005 and 2008. Are you sure this isn't caused by some other headers you're including in your app? That is to say, one definition is in jmorecfg.h, where is the other one? If you can post the entire warning (with file names and line numbers) it would be easier to see what's going on. Just to check that this isn't a red herring. To reply to Philip Taylor about the 64-bit issues, this is a 3rd party header, so OSG has little control over it. On the other hand, it comes from libjpeg, which is very popular and is used on almost all linux distros (most of which are built both 32 and 64 bit these days), so I imagine if there were any 64-bit-cleanliness issues, they would have heard about them by now. That is not to discount your point, which could very well be correct, but it's "out of OSG's hands" anyways. J-S -- __ Jean-Sebastien Guay [EMAIL PROTECTED] http://whitestar02.webhop.org/ This message was sent using IMP, the Internet Messaging Program. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] INT32 redeifinition with Win32 and VS8 binary package
Just an idle thought in passing with the advent of 64 bit builds, it may not be such a good idea to mark a "long" as a 32 bit quantity since I believe the redmond 64 bit model defines long as a 64 bit quantity where as an int is 32 bits. On 32 bit systems, the two are the same size and can be freely interchanged. So apply the patch but ensure the build is 32 bits only. Happy New Year PhilT -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Somerville, Andrew Sent: 09 January 2008 21:43 To: osg-users@lists.openscenegraph.org Subject: [osg-users] INT32 redeifinition with Win32 and VS8 binary package It appears that the VS8 binary package for osg2.2.0 has a problem in one of the 3rd party header files included. (jmorecfg.h) Compiling against it causes an error regarding redefinition of INT32. Im not sure if there are any repercussions, but there is a simple fix seen in an old patch on the secondlife wiki which protects the define with a check against WIN32 https://wiki.secondlife.com/wiki/Patch_jpeglib in jmorecfg.h: #ifndef XMD_H typedef long INT32; #endif is changed to: #if !defined( XMD_H ) && !defined( WIN32 ) typedef long INT32; #endif It also does an #undef on FAR just before it blanks it to remove a warning about redifinition. Im not sure how hard it would be to repackage the current 2.2 VS8 binary package, but at least it can be fixed for for future Visual Studio packages. Regards, Andy ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] INT32 redeifinition with Win32 and VS8 binary package
It appears that the VS8 binary package for osg2.2.0 has a problem in one of the 3rd party header files included. (jmorecfg.h) Compiling against it causes an error regarding redefinition of INT32. Im not sure if there are any repercussions, but there is a simple fix seen in an old patch on the secondlife wiki which protects the define with a check against WIN32 https://wiki.secondlife.com/wiki/Patch_jpeglib in jmorecfg.h: #ifndef XMD_H typedef long INT32; #endif is changed to: #if !defined( XMD_H ) && !defined( WIN32 ) typedef long INT32; #endif It also does an #undef on FAR just before it blanks it to remove a warning about redifinition. Im not sure how hard it would be to repackage the current 2.2 VS8 binary package, but at least it can be fixed for for future Visual Studio packages. Regards, Andy ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org