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. | |
#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:
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>
wxVersionInfo wxGetLibraryVersionInfo | ( | ) |
Get wxWidgets version information.
Include file:
#include <wx/utils.h>