osg::CompileConfig Struct Reference
[Initialization / Termination]

List of all members.

Public Member Functions

Constructors


 CompileConfig (UInt16 major, UInt16 minor, UInt16 release, bool debug, bool dll, bool mt)
bool compare (const CompileConfig &c)

Public Attributes

Members


UInt16 _major
UInt16 _minor
UInt16 _release
bool _mt
bool _dll
bool _debug


Detailed Description

Definition at line 203 of file OSGBaseFunctions.cpp.


Constructor & Destructor Documentation

osg::CompileConfig::CompileConfig ( UInt16  major,
UInt16  minor,
UInt16  release,
bool  debug,
bool  dll,
bool  mt 
) [inline]

Definition at line 209 of file OSGBaseFunctions.cpp.

00210                                                    :
00211     _major(major),
00212     _minor(minor),
00213     _release(release),
00214     _debug(debug),
00215     _dll(dll),
00216     _mt(mt)
00217     {}


Member Function Documentation

bool osg::CompileConfig::compare ( const CompileConfig c  ) 

Definition at line 239 of file OSGBaseFunctions.cpp.

References _debug, _dll, _major, _minor, _mt, _release, FDEBUG, FFATAL, FNOTICE, and FWARNING.

Referenced by osg::osgInit().

00240 {
00241     FDEBUG(("CompileConfig::compare: lib: version %d.%d.%d, %sdebug, %sdll, "
00242             "%smt \n",
00243             _major, _minor, _release, 
00244             _debug?"":"non-", _dll?"":"non-", _mt?"":"non-"));
00245     FDEBUG(("CompileConfig::compare: prog: version %d.%d.%d, %sdebug, %sdll, "
00246             "%smt \n",
00247             c._major, c._minor, c._release, 
00248             c._debug?"":"non-", c._dll?"":"non-", c._mt?"":"non-"));
00249              
00250     if(_major != c._major)
00251     {
00252         FFATAL(("The program is compiled against version %d headers, "
00253                 "but the library is version %d! It's a miracle it linked, "
00254                 "but it will not work.\n", _major, c._major));
00255         return true;
00256     }
00257     if(_minor != c._minor)
00258     {
00259         FWARNING(("The program is compiled against version %d.%d headers, "
00260                 "but the library is version %d.%d! This is not recommended "
00261                 "use at your own risk.\n", _major, _minor, c._major, c._minor));
00262     }
00263     if(_release != c._release)
00264     {
00265         FNOTICE(("The program is compiled against version %d.%d.%d headers, "
00266                 "but the library is version %d.%d.%d! This should "
00267                 "work fine, but if you have problems please mention it "
00268                 "in your report.\n", _major, _minor, _release,
00269                 c._major, c._minor, c._release));
00270     }
00271     if(_mt != c._mt)
00272     {
00273         FFATAL(("The program is linked against the %s-threaded runtime lib, "
00274                 "but the library is linked against the %s-threaded one! "
00275                 "This will lead to memory corruption, please link the "
00276                 "%s-threaded lib (use /M%s%s instead of /M%s%s)!\n", 
00277                 c._mt?"multi":"single", 
00278                 _mt?"multi":"single", _mt?"multi":"single",
00279                 _mt?"D":"L", _debug?"d":"", _mt?"L":"D", _debug?"d":""));
00280         return true;
00281     }
00282     
00283 #ifdef WIN32
00284     if(_debug != c._debug)
00285     {
00286         FFATAL(("The program is linked against the %sdebug runtime lib, "
00287                 "but the library is linked against the %sdebug one! "
00288                 "This will lead to memory corruption, please link the "
00289                 "%sdebug lib (use /M%s%s instead of /M%s%s)!\n", 
00290                 c._debug?"":"non-", 
00291                 _debug?"":"non-", _debug?"":"non-",
00292                 _mt?"D":"L", _debug?"d":"", _mt?"D":"L", _debug?"d":""));
00293         return true;
00294     }
00295 #endif
00296 
00297     return false;
00298 }


Member Data Documentation

Definition at line 226 of file OSGBaseFunctions.cpp.

Referenced by compare().

Definition at line 227 of file OSGBaseFunctions.cpp.

Referenced by compare().

Definition at line 228 of file OSGBaseFunctions.cpp.

Referenced by compare().

Definition at line 232 of file OSGBaseFunctions.cpp.

Referenced by compare().

Definition at line 233 of file OSGBaseFunctions.cpp.

Referenced by compare().

Definition at line 234 of file OSGBaseFunctions.cpp.

Referenced by compare().


The documentation for this struct was generated from the following file:

Generated on Mon Mar 17 11:10:41 2008 for OpenSG by  doxygen 1.5.5