Page 1 of 1

Warnings in any compile that uses Ogre

Posted: Mon Feb 14, 2005 6:49 pm
by stenyak
Hi, i'm getting a couple of warnings for every file that includes ogre.h. The warnings are these:

Code: Select all

In file included from /usr/include/OGRE/OgreEntity.h:37,
                 from /usr/include/OGRE/Ogre.h:41,
                 from data/suspensionData.cpp:12:
/usr/include/OGRE/OgreSharedPtr.h: In member function `void 
   Ogre::SharedPtr<T>::destroy() [with T = Ogre::Mesh]':
/usr/include/OGRE/OgreSharedPtr.h:140:   instantiated from `void Ogre::SharedPtr<T>::release() [with T = Ogre::Mesh]'
/usr/include/OGRE/OgreSharedPtr.h:88:   instantiated from `Ogre::SharedPtr<T>::~SharedPtr() [with T = Ogre::Mesh]'
/usr/include/OGRE/OgreMesh.h:53:   instantiated from here
/usr/include/OGRE/OgreSharedPtr.h:149: warning: possible problem detected in 
   invocation of delete operator:
/usr/include/OGRE/OgreSharedPtr.h:149: warning: invalid use of undefined type `
   struct Ogre::Mesh'
/usr/include/OGRE/OgrePrerequisites.h:260: warning: forward declaration of `
   struct Ogre::Mesh'
/usr/include/OGRE/OgreSharedPtr.h:149: note: neither the destructor nor the 
   class-specific operator delete will be called, even if they are declared 
   when the class is defined.
Am i doing something wrong, or is this normal? If more info is needed, tell me what to post and i'll post it.

BTW data/suspensionData.cpp:12: is just a #include "Ogre.h"
I'm using Ogre v1rc1. I had no warnings with Ogre v0.15.2

Posted: Mon Feb 14, 2005 7:40 pm
by LordMyth
I'm having 'note's on my GCC with SharedPtr...

Posted: Mon Feb 14, 2005 9:04 pm
by sargar
Hil,

Please, somebody can say how to only deactivate those messages of warning in LInux? They are very annoying when you must compile much :x

Thanks in advance

Posted: Mon Feb 14, 2005 9:15 pm
by _mental_
Yeah this is a known issue and I really must find a perminent solution to it.

Posted: Mon Feb 14, 2005 10:45 pm
by Clay
Please respond to this post or put something in the developer's section when you do change this. It might break pyogre, since SharedPtr is a sensitive area for pyogre.

Posted: Mon Feb 14, 2005 10:56 pm
by :wumpus:
Installing gcc 3.4.x gets rid of the warning too.

Posted: Mon Feb 14, 2005 11:29 pm
by sinbad
I'm inclined to think this is a false warning since it disappears on later gcc's and I can't for the life of me understand what it doesn't like (we've tried a number of workarounds that should have worked and none did).

Posted: Tue Feb 15, 2005 12:11 am
by _mental_
:wumpus: wrote:Installing gcc 3.4.x gets rid of the warning too.
I can swear I got it on both 3.4.x and 3.3.x. I'll check tonight.

Posted: Tue Feb 15, 2005 4:52 am
by LordMyth
yup I got 3.4.4 and stil notes about sharedptr

Posted: Tue Feb 15, 2005 5:48 am
by _mental_
Ok I was completely wrong. 3.4.4 doesn't throw up that warning on my system.

Posted: Tue Feb 15, 2005 6:37 am
by _mental_
Ok something weird is definitely going on with both 3.3 & 3.4 (even though 3.4 doesn't complain). I'll continue looking into this tomorrow.

Posted: Fri Feb 18, 2005 2:51 am
by waxor
(bump)

Anyone sorted this out yet?

Posted: Fri Feb 18, 2005 5:41 am
by _mental_
I'm still working on it. I haven't had much time recently due to work and family constraints but I really need to get this sorted by the weekend.

Posted: Tue Feb 22, 2005 4:36 pm
by _mental_
Ok this has been fixed in the v1-0 branch of CVS.

Posted: Tue Feb 22, 2005 5:23 pm
by :wumpus:
Great work _mental_, going to test it in a min