I just tried to integrate TrueAxis into a project Im using. It compiled alright before I added in the TA code and then I compiled and I got these warnings (with another couple 100 following thes ):
c:...\include\OgreAnimation.h(207) : warning C4251: 'Ogre::Animation::mTrackList' : class 'std::map<_Kty,_Ty>' needs to have dll-interface to be used by clients of class 'Ogre::Animation'
c:...\include\OgreAnimation.h(208) : warning C4251: 'Ogre::Animation::mName' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'Ogre::Animation'
c:...\include\OgreSimpleSpline.h(111) : warning C4251: 'Ogre::SimpleSpline::mPoints' : class 'std::vector<_Ty>' needs to have dll-interface to be used by clients of class 'Ogre::SimpleSpline'
I know there are other topics on this warning but they had to do with seperate libraries and not when compiling a project with Ogre. Im using the Ogre 1.0.5 SDK.
I tried to remove all the header files and header/linking directories I added into my project settings to get TA working, so my project settings were back the way they were, but I still get all the warnings.
Thanks for any help
Last edited by old_man_auz on Thu Nov 17, 2005 5:13 am, edited 2 times in total.
Well they do look ugly when you compile a project and you get all those warnings.
The thing is that they have never shown up when Ive compiled my project before or any other ogre project for that matter, and then I start to implement TrueAxis and I get all the warnings, plus some errors in TA so I remove TA and still get all the warnings..
I was kinda puzzled, thought Id stuft something.
Im using Visual C++ Toolkit 2003 if that makes any difference.
Well all the articles on the Ogre Forums and in the Google results said to pretty much just ignore the warnings..turn them off, which is what you just said. And if thats a valid way to fix the problem then Im happy enough to do that. ..
But I was wondering more, why do I get them all of a sudden when I compile my project. I assume on one else gets these warnings when they compile Ogre projects.
old_man_auz wrote:But I was wondering more, why do I get them all of a sudden when I compile my project. I assume on one else gets these warnings when they compile Ogre projects.
Not an expert here, but looks like TrueAxis and Ogre have different defines for exports, and they somehow collide. You should try to separate them somehow when including their files.
When I first got all these warnings, I was curiosu to see weather it was TA so I removed all the headers for the TA stuff and revomed all the directories I added in in the project settings, and I still got all the warnings. Should I still look into what you said ?
No, this is common when returning STL containers or classes from exported DLL functions or class members. They are harmless, and can safely be ignored.
These warnings are already #pragma'ed out of Ogre builds; it is possible that the TrueAxis headers turn them back on.
I removed the errors by rearranging the order of my header files.
I used to have
- Newton Header Files
- Cegui Header Files
- Ogre Header Files
The problems occured when I removed the newton header files
When I changed the order for this, it removed all the warnings.
- Ogre headers
- CEGUI headers
- TrueAxis headers