Inheriting from LayoutEditor class causes warning [SOLVED]

Senzin

22-05-2013 10:35:10

I'm inheriting from a class exported by the layout editor. Basically, I let the code generator make the base class, then I write all code in the derived class. This way if I make changes that require running the code generator again, it doesn't kill all my code.

But when the cpp file of the derived class compiles, I always get this warning. I actually already have this warning disabled with /wd4275 because Ogre tends to produce a lot of these anyway. If I remove the /wd4275 from the compile options, I get a lot more warnings, including some from MyGUI, so it's definitely doing something. But for some reason, I just cannot suppress this particular instance of the warning. I've tried to ignore it, but it's starting to get on my nerves. And I worry that as I add more MyGUI windows, I'll get more of these warnings.


1>d:\dev\libs\ogre\ogresdk_vc10_v1-8-1\include\ogre\OgrePixelFormat.h(197): warning C4275: non dll-interface struct 'Ogre::Box' used as base for dll-interface class 'Ogre::PixelBox'
1> d:\dev\libs\ogre\ogresdk_vc10_v1-8-1\include\ogre\OgreCommon.h(661) : see declaration of 'Ogre::Box'
1> d:\dev\libs\ogre\ogresdk_vc10_v1-8-1\include\ogre\OgrePixelFormat.h(197) : see declaration of 'Ogre::PixelBox'

I'm also getting a c4996 warning if I use cprintf instead of _cprintf. Again, I've had it disabled all along with /wd4996, but now it's showing up again. Any ideas?

Altren

22-05-2013 12:23:00

I found the problems.
Warning 4275 was supressed wrong way on our code (I just commited fix in MyGUI_UString.h).
What about 4996 - it is being enabled by all MyGUI_Ogre***.h headers. We need this, since there are deprecated functions in MyGUI and this warning also tells what code to use instead.
So, to fix 4275 either update MyGUI or remove pragma warning (default : 4275) from MyGUI_Ustring.h.
To fix 4996 do not include MyGUI_Ogre***.h headers to places where you use deprecated functions.

Senzin

26-05-2013 07:18:18

All fixed. Thanks! :)