| Version: 3.0.5

- Main Page
- Related Pages
- Categories
- Classes
- Files

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Macros | Functions
Versioning
Functions and Macros by Category

## 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. More...
#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. More...
#define | wxCHECK_VISUALC_VERSION(major)
| Returns true if the compiler being used is Visual C++ and its version is at least major or greater. More...
#define | wxCHECK_W32API_VERSION(major, minor)
| Returns true if the version of w32api headers used is major.minor or greater. More...
#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. More...
#define | wxCHECK_VERSION_FULL(major, minor, release, subrel)
| Same as wxCHECK_VERSION() but also checks that wxSUBRELEASE_NUMBER is at least subrel. More...

## Functions

wxVersionInfo | wxGetLibraryVersionInfo ()
| Get wxWidgets version information. More...

## 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:

1 wxString s;
2 #if wxCHECK_VERSION(2, 2, 0)
3 if ( s.StartsWith("foo") )
4 #else // replacement code for old version
5 if ( strncmp(s, "foo", 3) == 0 )
6 #endif
7 {
8 ...
9 }

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