| Version: 3.2.5

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

## ◆ wxCHECK_GCC_VERSION

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

## ◆ wxCHECK_SUNCC_VERSION

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

## ◆ wxCHECK_VERSION

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

wxString s;
#if wxCHECK_VERSION(2, 2, 0)
if ( s.StartsWith("foo") )
#else // replacement code for old version
if ( strncmp(s, "foo", 3) == 0 )
#endif
{
...
}
wxString
String class for passing textual data to or receiving it from wxWidgets.
Definition: string.h:315
wxString::StartsWith
bool StartsWith(const wxString &prefix, wxString *rest=NULL) const
This function can be used to test if the string starts with the specified prefix.

Include file:

    #include <wx/version.h>

## ◆ wxCHECK_VERSION_FULL

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

## ◆ wxCHECK_VISUALC_VERSION

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

## ◆ wxCHECK_W32API_VERSION

#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

## ◆ wxGetLibraryVersionInfo()

wxVersionInfo wxGetLibraryVersionInfo | ( |  | ) |

Get wxWidgets version information.

Since
  2.9.2

See also
  wxVersionInfo

Include file:

    #include <wx/utils.h>

##

Library: wxCore