Version: 3.0.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Versioning

Detailed Description

The following constants are defined in wxWidgets:

wxMAJOR_VERSION The major version of wxWidgets
wxMINOR_VERSION The minor version of wxWidgets
wxRELEASE_NUMBER The release number
wxSUBRELEASE_NUMBER The subrelease number which is 0 for all official releases

For example, the values or these constants for wxWidgets 2.8.7 are 2, 8, 7 and 0.

Additionally, wxVERSION_STRING is a user-readable string containing the full wxWidgets version and wxVERSION_NUMBER is a combination of the three version numbers above: for 2.1.15, it is 2115 and it is 2200 for wxWidgets 2.2.

The subrelease number is only used for the sources in between official releases and so normally is not useful.

Include file:

#include <wx/version.h> 

Macros

#define wxCHECK_GCC_VERSION(major, minor)
 Returns true if the compiler being used is GNU C++ and its version is at least major.minor or greater.
 
#define wxCHECK_SUNCC_VERSION(major, minor)
 Returns true if the compiler being used is Sun CC Pro and its version is at least major.minor or greater.
 
#define wxCHECK_VISUALC_VERSION(major)
 Returns true if the compiler being used is Visual C++ and its version is at least major or greater.
 
#define wxCHECK_W32API_VERSION(major, minor)
 Returns true if the version of w32api headers used is major.minor or greater.
 
#define wxCHECK_VERSION(major, minor, release)
 This is a macro which evaluates to true if the current wxWidgets version is at least major.minor.release.
 
#define wxCHECK_VERSION_FULL(major, minor, release, subrel)
 Same as wxCHECK_VERSION() but also checks that wxSUBRELEASE_NUMBER is at least subrel.
 

Functions

wxVersionInfo wxGetLibraryVersionInfo ()
 Get wxWidgets version information.
 

Macro Definition Documentation

#define wxCHECK_GCC_VERSION (   major,
  minor 
)

Returns true if the compiler being used is GNU C++ and its version is at least major.minor or greater.

Returns false otherwise.

Include file:

#include <wx/platform.h> 
#define wxCHECK_SUNCC_VERSION (   major,
  minor 
)

Returns true if the compiler being used is Sun CC Pro and its version is at least major.minor or greater.

Returns false otherwise.

Include file:

#include <wx/platform.h> 
#define wxCHECK_VERSION (   major,
  minor,
  release 
)

This is a macro which evaluates to true if the current wxWidgets version is at least major.minor.release.

For example, to test if the program is compiled with wxWidgets 2.2 or higher, the following can be done:

#if wxCHECK_VERSION(2, 2, 0)
if ( s.StartsWith("foo") )
#else // replacement code for old version
if ( strncmp(s, "foo", 3) == 0 )
#endif
{
...
}

Include file:

#include <wx/version.h> 
#define wxCHECK_VERSION_FULL (   major,
  minor,
  release,
  subrel 
)

Same as wxCHECK_VERSION() but also checks that wxSUBRELEASE_NUMBER is at least subrel.

Include file:

#include <wx/version.h> 
#define wxCHECK_VISUALC_VERSION (   major)

Returns true if the compiler being used is Visual C++ and its version is at least major or greater.

Returns false otherwise.

Include file:

#include <wx/platform.h> 
#define wxCHECK_W32API_VERSION (   major,
  minor 
)

Returns true if the version of w32api headers used is major.minor or greater.

Otherwise, and also if we are not compiling with MinGW32/Cygwin under Win32 at all, returns false.

Include file:

#include <wx/platform.h> 

Function Documentation

wxVersionInfo wxGetLibraryVersionInfo ( )

Get wxWidgets version information.

Since
2.9.2
See Also
wxVersionInfo

Include file:

#include <wx/utils.h> 

Library:  wxCore