Page 1 of 1

Warning in compilation

Posted: Sat Apr 09, 2005 16:08
by daesdemon
Hello all

I am using CEGUI with Ogre.

I include cegui.h before ogre to avoir error manager errors.

At first it work ok but i changed the order of something in my predefinate.h and now i get loads of warning (1 per file) like this:

Code: Select all

f:\dev\3D\Dependencies\include\CEGUI\CEGUILogger.h(150) : warning C4251: 'CEGUI::Logger::d_cache' :
class 'std::vector<_Ty>' nécessite une interface DLL pour être utilisé(e) par les clients de class 'CEGUI::Logger'


In english it should be:

Code: Select all

f:\dev\3D\Dependencies\include\CEGUI\CEGUILogger.h(150) : warning C4251: 'CEGUI::Logger::d_cache' :
class 'std::vector<_Ty>' need a DLL interface to be used by clients of class 'CEGUI::Logger'



It is not a problem , but it pollutes my compilation ;)

Do someone have an idea??

My header is:

Code: Select all

 
#include <CEGUI/CEGUI.h>
#include <OgreCEGUIRenderer.h>
#include <OgreCEGUIResourceProvider.h>
#include <OgreSingleton.h>

Re: Warning in compilation

Posted: Sat Apr 09, 2005 17:35
by CrazyEddie
The only solution that I know of is to disable the warning. You always get this when building a DLL with classes that make use of other classes which are not exported from the DLL.

CEGUI makes heavy use of disabling this warning ;)

P.S. If anybody asks, I was never here :lol:

Re: Warning in compilation

Posted: Sat Apr 09, 2005 18:00
by daesdemon
ok , normal behavior so, no problem.

Thx Eddie

PS: No problems I haven't seen you, Eddie ;)

Re: Warning in compilation

Posted: Sun Apr 10, 2005 12:32
by daesdemon

Code: Select all

#pragma warning( disable : 4251 )
for those who are interested by on VS2003

Re: Warning in compilation

Posted: Tue May 03, 2005 17:36
by osb1842
Shouldn't the #pragma be placed in the CEGUILogger.h file itself, so we don't need to use a hacked version of CEGUI?

Something like...

#if defined(_MSC_VER)
# pragma warning(push)
# pragma warning(disable : 4251)
# pragma warning(disable : 4275)
#endif