1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wxWidgets: Preprocessor Symbols</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="page_container">
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" style="width: 100%;">
<tbody>
<tr>
<td id="projectlogo">
<a href="http://www.wxwidgets.org/" target="_new">
<img alt="wxWidgets" src="logo.png"/>
</a>
</td>
<td style="padding-left: 0.5em; text-align: right;">
<span id="projectnumber">Version: 3.0.2</span>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.8.2 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Categories</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="index.html">Documentation</a></li><li class="navelem"><a class="el" href="page_constants.html">Constants</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">Preprocessor Symbols </div> </div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>Table of Contents</h3>
<ul><li class="level1"><a href="#page_cppconst_guisystem">GUI system</a></li>
<li class="level1"><a href="#page_cppconst_os">Operating Systems</a></li>
<li class="level1"><a href="#page_cppconst_cpu">Hardware Architectures (CPU)</a></li>
<li class="level1"><a href="#page_cppconst_hardware">Hardware Type</a></li>
<li class="level1"><a href="#page_cppconst_compiler">Compilers</a></li>
<li class="level1"><a href="#page_cppconst_featuretests">Feature Tests</a></li>
<li class="level1"><a href="#page_cppconst_msvc_setup_h">Library Selection for MSVC</a></li>
<li class="level1"><a href="#page_cppconst_miscellaneous">Miscellaneous</a></li>
</ul>
</div>
<div class="textblock"><p>These are preprocessor symbols used in the wxWidgets source, grouped by category (and sorted by alphabetical order inside each category).</p>
<p>All of these macros except for the <code>wxUSE_XXX</code> variety is defined if the corresponding condition is <span class="literal">true</span> and undefined if it isn't, so they should be always tested using <span class="literal">#ifdef</span> and not <span class="literal">#if</span>.</p>
<h1><a class="anchor" id="page_cppconst_guisystem"></a>
GUI system</h1>
<table class="doclist" border="1" cellspacing="0">
<tr>
<td><span class="itemdef">__WXBASE__</span> </td><td>Only wxBase, no GUI features (same as <code>wxUSE_GUI</code> == 0) </td></tr>
<tr>
<td><span class="itemdef">__WXCOCOA__</span> </td><td>OS X using wxCocoa Port </td></tr>
<tr>
<td><span class="itemdef">__WXDFB__</span> </td><td>wxUniversal using DirectFB </td></tr>
<tr>
<td><span class="itemdef">__WXWINCE__</span> </td><td>Windows CE </td></tr>
<tr>
<td><span class="itemdef">__WXGTK__</span> </td><td>GTK+ </td></tr>
<tr>
<td><span class="itemdef">__WXGTK12__</span> </td><td>GTK+ 1.2 or higher </td></tr>
<tr>
<td><span class="itemdef">__WXGTK20__</span> </td><td>GTK+ 2.0 or higher </td></tr>
<tr>
<td><span class="itemdef">__WXGTK24__</span> </td><td>GTK+ 2.4 or higher </td></tr>
<tr>
<td><span class="itemdef">__WXGTK26__</span> </td><td>GTK+ 2.6 or higher </td></tr>
<tr>
<td><span class="itemdef">__WXGTK210__</span> </td><td>GTK+ 2.10 or higher </td></tr>
<tr>
<td><span class="itemdef">__WXMAC__</span> </td><td>old define, same as <code><b>WXOSX</b></code> </td></tr>
<tr>
<td><span class="itemdef">__WXMOTIF__</span> </td><td>Motif </td></tr>
<tr>
<td><span class="itemdef">__WXMOTIF20__</span> </td><td>Motif 2.0 or higher </td></tr>
<tr>
<td><span class="itemdef">__WXMSW__</span> </td><td>GUI using <a href="http://en.wikipedia.org/wiki/Windows_User">Windows Controls</a>. Notice that for compatibility reasons, this symbol is defined for console applications under Windows as well, but it should only be used in the GUI code while <code><b>WINDOWS</b></code> should be used for the platform tests. </td></tr>
<tr>
<td><span class="itemdef">__WXOSX__</span> </td><td>OS X GUI using any Apple widget framework (Carbon, AppKit or UIKit) </td></tr>
<tr>
<td><span class="itemdef">__WXOSX_IPHONE__</span> </td><td>OS X iPhone (UIKit) </td></tr>
<tr>
<td><span class="itemdef">__WXOSX_CARBON__</span> </td><td>Mac OS X using Carbon </td></tr>
<tr>
<td><span class="itemdef">__WXOSX_COCOA__</span> </td><td>Mac OS X using Cocoa (AppKit) </td></tr>
<tr>
<td><span class="itemdef">__WXOSX_MAC__</span> </td><td>Mac OS X (Carbon or Cocoa) </td></tr>
<tr>
<td><span class="itemdef">__WXOSX_OR_COCOA__</span> </td><td>Any Mac OS X port (wxOSX-Carbon, wxOSX-Cocoa or wxCocoa) </td></tr>
<tr>
<td><span class="itemdef">__WXPM__</span> </td><td>OS/2 native Presentation Manager </td></tr>
<tr>
<td><span class="itemdef">__WXSTUBS__</span> </td><td>Stubbed version ('template' wxWin implementation) </td></tr>
<tr>
<td><span class="itemdef">__WXXT__</span> </td><td>Xt; mutually exclusive with WX_MOTIF, not implemented in wxWidgets 2.x </td></tr>
<tr>
<td><span class="itemdef">__WXX11__</span> </td><td>wxX11 (<b>WXUNIVERSAL</b> will be also defined) </td></tr>
<tr>
<td><span class="itemdef">__WXWINE__</span> </td><td>WINE (i.e. WIN32 on Unix) </td></tr>
<tr>
<td><span class="itemdef">__WXUNIVERSAL__</span> </td><td>wxUniversal port, always defined in addition to one of the symbols above so this should be tested first. </td></tr>
<tr>
<td><span class="itemdef">__X__</span> </td><td>any X11-based GUI toolkit except GTK+ </td></tr>
</table>
<p>There are two wxWidgets ports to Mac OS X. One of them, wxOSX is the successor of the venerable wxMac, it currently exists in three versions: Carbon and Cocoa for the desktop and a very early iPhone port. And there is the Cocoa port named wxCocoa which has not been updated very actively since beginning 2008. To summarize:</p>
<ul>
<li>If you want to test for wxOSX on the desktop, use <code><b>WXOSX_MAC</b></code>. </li>
<li>If you want to test for wxOSX on the iPhone, use <code><b>WXOSX_IPHONE</b></code>. </li>
<li>If you want to test for any GUI Mac port under OS X, use <code><b>WXOSX_OR_COCOA</b></code>. </li>
<li>If you want to test for any port under Mac OS X, including, for example, wxGTK and also wxBase, use <code><b>DARWIN</b></code> (see below).</li>
</ul>
<p>The convention is to use the <code>__WX</code> prefix for these symbols, although this has not always been followed.</p>
<h1><a class="anchor" id="page_cppconst_os"></a>
Operating Systems</h1>
<table class="doclist" border="1" cellspacing="0">
<tr>
<td><span class="itemdef">__APPLE__</span> </td><td>any Mac OS version </td></tr>
<tr>
<td><span class="itemdef">__AIX__</span> </td><td>AIX </td></tr>
<tr>
<td><span class="itemdef">__BSD__</span> </td><td>Any *BSD system </td></tr>
<tr>
<td><span class="itemdef">__CYGWIN__</span> </td><td>Cygwin: Unix on Win32 </td></tr>
<tr>
<td><span class="itemdef">__DARWIN__</span> </td><td>Mac OS X (with BSD C library), using any port (see also <code><b>WXOSX</b></code>) </td></tr>
<tr>
<td><span class="itemdef">__DATA_GENERAL__</span> </td><td>DG-UX </td></tr>
<tr>
<td><span class="itemdef">__FREEBSD__</span> </td><td>FreeBSD </td></tr>
<tr>
<td><span class="itemdef">__HPUX__</span> </td><td>HP-UX (Unix) </td></tr>
<tr>
<td><span class="itemdef">__GNU__</span> </td><td>GNU Hurd </td></tr>
<tr>
<td><span class="itemdef">__LINUX__</span> </td><td>Linux </td></tr>
<tr>
<td><span class="itemdef">__MACH__</span> </td><td>Mach-O Architecture (Mac OS X only builds) </td></tr>
<tr>
<td><span class="itemdef">__OSF__</span> </td><td>OSF/1 </td></tr>
<tr>
<td><span class="itemdef">__QNX__</span> </td><td>QNX Neutrino RTOS </td></tr>
<tr>
<td><span class="itemdef">__SGI__</span> </td><td>IRIX </td></tr>
<tr>
<td><span class="itemdef">__SOLARIS__</span> </td><td>Solaris </td></tr>
<tr>
<td><span class="itemdef">__SUN__</span> </td><td>Any Sun </td></tr>
<tr>
<td><span class="itemdef">__SUNOS__</span> </td><td>Sun OS </td></tr>
<tr>
<td><span class="itemdef">__SVR4__</span> </td><td>SystemV R4 </td></tr>
<tr>
<td><span class="itemdef">__SYSV__</span> </td><td>SystemV generic </td></tr>
<tr>
<td><span class="itemdef">__ULTRIX__</span> </td><td>Ultrix </td></tr>
<tr>
<td><span class="itemdef">__UNIX__</span> </td><td>any Unix </td></tr>
<tr>
<td><span class="itemdef">__UNIX_LIKE__</span> </td><td>Unix, BeOS or VMS </td></tr>
<tr>
<td><span class="itemdef">__VMS__</span> </td><td>VMS </td></tr>
<tr>
<td><span class="itemdef">__WINDOWS__</span> </td><td>Any Windows platform, using any port (see also <code><b>WXMSW</b></code>) </td></tr>
<tr>
<td><span class="itemdef">__WIN16__</span> </td><td>Win16 API (not supported since wxWidgets 2.6) </td></tr>
<tr>
<td><span class="itemdef">__WIN32__</span> </td><td>Win32 API </td></tr>
<tr>
<td><span class="itemdef">__WIN64__</span> </td><td>Win64 (mostly same as Win32 but data type sizes are different) </td></tr>
<tr>
<td><span class="itemdef">__WINE__</span> </td><td>Wine </td></tr>
<tr>
<td><span class="itemdef">_WIN32_WCE</span> </td><td>Windows CE version </td></tr>
</table>
<h1><a class="anchor" id="page_cppconst_cpu"></a>
Hardware Architectures (CPU)</h1>
<p>Note that not all of these symbols are always defined, it depends on the compiler used.</p>
<table class="doclist" border="1" cellspacing="0">
<tr>
<td><span class="itemdef">__ALPHA__</span> </td><td>DEC Alpha architecture </td></tr>
<tr>
<td><span class="itemdef">__INTEL__</span> </td><td>Intel i386 or compatible </td></tr>
<tr>
<td><span class="itemdef">__IA64__</span> </td><td>Intel 64 bit architecture </td></tr>
<tr>
<td><span class="itemdef">__POWERPC__</span> </td><td>Motorola Power PC </td></tr>
</table>
<h1><a class="anchor" id="page_cppconst_hardware"></a>
Hardware Type</h1>
<table class="doclist" border="1" cellspacing="0">
<tr>
<td><span class="itemdef">__SMARTPHONE__</span> </td><td>Generic mobile devices with phone buttons and a small display </td></tr>
<tr>
<td><span class="itemdef">__PDA__</span> </td><td>Personal digital assistant, usually with touch screen </td></tr>
<tr>
<td><span class="itemdef">__HANDHELD__</span> </td><td>Small but powerful computer, usually with a keyboard </td></tr>
<tr>
<td><span class="itemdef">__POCKETPC__</span> </td><td>Microsoft-powered PocketPC devices with touch-screen </td></tr>
<tr>
<td><span class="itemdef">__WINCE_STANDARDSDK__</span> </td><td>Microsoft-powered Windows CE devices, for generic Windows CE applications </td></tr>
<tr>
<td><span class="itemdef">__WINCE_NET__</span> </td><td>Microsoft-powered Windows CE .NET devices (_WIN32_WCE is 400 or greater) </td></tr>
<tr>
<td><span class="itemdef">WIN32_PLATFORM_WFSP</span> </td><td>Microsoft-powered smartphone </td></tr>
</table>
<h1><a class="anchor" id="page_cppconst_compiler"></a>
Compilers</h1>
<table class="doclist" border="1" cellspacing="0">
<tr>
<td><span class="itemdef">__BORLANDC__</span> </td><td>Borland C++. The value of the macro corresponds to the compiler version: 500 is 5.0. </td></tr>
<tr>
<td><span class="itemdef">__DJGPP__</span> </td><td>DJGPP </td></tr>
<tr>
<td><span class="itemdef">__DIGITALMARS__</span> </td><td>Digital Mars </td></tr>
<tr>
<td><span class="itemdef">__EVC4__</span> </td><td>Embedded Visual C++ 4 (can be only used for building wxWinCE) </td></tr>
<tr>
<td><span class="itemdef">__GNUG__</span> </td><td>Gnu C++ on any platform, see also wxCHECK_GCC_VERSION </td></tr>
<tr>
<td><span class="itemdef">__GNUWIN32__</span> </td><td>Gnu-Win32 compiler, see also wxCHECK_W32API_VERSION </td></tr>
<tr>
<td><span class="itemdef">__INTELC__</span> </td><td>Intel C++ compiler </td></tr>
<tr>
<td><span class="itemdef">__MINGW32__</span> </td><td>Either MinGW32 or MinGW-w64 in either 32 or 64 bits </td></tr>
<tr>
<td><span class="itemdef">__MINGW32_TOOLCHAIN</span> </td><td>MinGW32 only (32 bits only right now) </td></tr>
<tr>
<td><span class="itemdef">__MINGW64__</span> </td><td>MinGW-w64 in 64 bit builds </td></tr>
<tr>
<td><span class="itemdef">__MINGW64_TOOLCHAIN__</span> </td><td>MinGW-w64 in either 32 or 64 bit builds </td></tr>
<tr>
<td><span class="itemdef">__SUNCC__</span> </td><td>Sun CC, see also wxCHECK_SUNCC_VERSION </td></tr>
<tr>
<td><span class="itemdef">__SYMANTECC__</span> </td><td>Symantec C++ </td></tr>
<tr>
<td><span class="itemdef">__VISAGECPP__</span> </td><td>IBM Visual Age (OS/2) </td></tr>
<tr>
<td><span class="itemdef">__VISUALC__</span> </td><td>Microsoft Visual C++, see also <a class="el" href="group__group__funcmacro__version.html#ga5a01a6b9009ee0ef3b90d520b1a0f5c1" title="Returns true if the compiler being used is Visual C++ and its version is at least major or greater...">wxCHECK_VISUALC_VERSION</a>. The value of this macro corresponds to the compiler version: <code>1020</code> for <code>4.2</code> (the first supported version), <code>1100</code> for <code>5.0</code>, <code>1200</code> for <code>6.0</code> and so on. For convenience, the symbols <b>VISUALCn</b> are also defined for each major compiler version from 5 to 12, i.e. you can use tests such <span class="literal">#ifdef</span> <b>VISUALC7</b> to test for compiler version being precisely 7. </td></tr>
<tr>
<td><span class="itemdef">__XLC__</span> </td><td>AIX compiler </td></tr>
<tr>
<td><span class="itemdef">__WATCOMC__</span> </td><td>Watcom C++. The value of this macro corresponds to the compiler version, <code>1100</code> is <code>11.0</code> and <code>1200</code> is OpenWatcom. </td></tr>
</table>
<h1><a class="anchor" id="page_cppconst_featuretests"></a>
Feature Tests</h1>
<p>Some library features may not be always available even if they were selected by the user. To make it possible to check if this is the case, the library predefines the symbols in the form <code>wxHAS_FEATURE</code>. Unlike <code>wxUSE_FEATURE</code> symbols which are defined by the library user (directly in <code>setup.h</code> or by running configure script) and which must be always defined as either 0 or 1, the <code>wxHAS</code> symbols are only defined if the corresponding feature is available and not defined at all otherwise.</p>
<p>Currently the following symbols exist:</p>
<table class="doclist" border="1" cellspacing="0">
<tr>
<td><span class="itemdef">wxHAS_3STATE_CHECKBOX</span> </td><td>Defined if <a class="el" href="classwx_check_box.html" title="A checkbox is a labelled box which by default is either on (checkmark is visible) or off (no checkmar...">wxCheckBox</a> supports wxCHK_3STATE flag, i.e. is capable of showing three states and not only the usual two. Currently defined for almost all ports. </td></tr>
<tr>
<td><span class="itemdef">wxHAS_ATOMIC_OPS</span> </td><td>Defined if <a class="el" href="group__group__funcmacro__atomic.html#ga35470b5fc125b443e73b7967100752d4" title="This function increments value in an atomic manner.">wxAtomicInc()</a> and <a class="el" href="group__group__funcmacro__atomic.html#ga396a0a6c5b705d46862564f5b16897b2" title="This function decrements value in an atomic manner.">wxAtomicDec()</a> functions have an efficient (CPU-specific) implementation. Notice that the functions themselves are always available but can be prohibitively slow to use when implemented in a generic way, using a critical section. </td></tr>
<tr>
<td><span class="itemdef">wxHAS_BITMAPTOGGLEBUTTON</span> </td><td>Defined in <code><a class="el" href="tglbtn_8h.html">wx/tglbtn.h</a></code> if <a class="el" href="classwx_bitmap_toggle_button.html" title="wxBitmapToggleButton is a wxToggleButton that contains a bitmap instead of text.">wxBitmapToggleButton</a> class is available in addition to <a class="el" href="classwx_toggle_button.html" title="wxToggleButton is a button that stays pressed when clicked by the user.">wxToggleButton</a>. </td></tr>
<tr>
<td><span class="itemdef">wxHAS_CONFIG_TEMPLATE_RW</span> </td><td>Defined if the currently used compiler supports template Read() and Write() methods in wxConfig. </td></tr>
<tr>
<td><span class="itemdef">wxHAS_LARGE_FILES</span> </td><td>Defined if <a class="el" href="classwx_file.html" title="A wxFile performs raw file I/O.">wxFile</a> supports files more than 4GB in size (notice that you must include <code><a class="el" href="filefn_8h.html">wx/filefn.h</a></code> before testing for this symbol). </td></tr>
<tr>
<td><span class="itemdef">wxHAS_LARGE_FFILES</span> </td><td>Defined if <a class="el" href="classwx_f_file.html" title="wxFFile implements buffered file I/O.">wxFFile</a> supports files more than 4GB in size (notice that you must include <code><a class="el" href="filefn_8h.html">wx/filefn.h</a></code> before testing for this symbol). </td></tr>
<tr>
<td><span class="itemdef">wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG</span> </td><td>Defined if compiler supports a 64 bit integer type (available as <code>wxLongLong_t</code>) and this type is different from long. Notice that, provided wxUSE_LONGLONG is not turned off, some 64 bit type is always available to wxWidgets programs and this symbol only indicates a presence of such primitive type. It is useful to decide whether some function should be overloaded for both <code>long</code> and <code>long long</code> types. </td></tr>
<tr>
<td><span class="itemdef">wxHAS_MULTIPLE_FILEDLG_FILTERS</span> </td><td>Defined if <a class="el" href="classwx_file_dialog.html" title="This class represents the file chooser dialog.">wxFileDialog</a> supports multiple ('|'-separated) filters. </td></tr>
<tr>
<td><span class="itemdef">wxHAS_IMAGES_IN_RESOURCES</span> </td><td>Defined if <a href="http://en.wikipedia.org/wiki/Resource_(Windows)">Windows resource files</a> or OS/2 resource files are available on the current platform. </td></tr>
<tr>
<td><span class="itemdef">wxHAS_POWER_EVENTS</span> </td><td>Defined if <a class="el" href="classwx_power_event.html" title="The power events are generated when the system power state changes, e.g.">wxPowerEvent</a> are ever generated on the current platform. </td></tr>
<tr>
<td><span class="itemdef">wxHAS_RADIO_MENU_ITEMS</span> </td><td>Defined if the current port supports radio menu items (see <a class="el" href="classwx_menu.html#a3ec8da997f0969d6df4f2394af6a9580" title="Adds a radio item to the end of the menu.">wxMenu::AppendRadioItem</a>). </td></tr>
<tr>
<td><span class="itemdef">wxHAS_RAW_BITMAP</span> </td><td>Defined if direct access to bitmap data using the classes in <code><a class="el" href="rawbmp_8h.html">wx/rawbmp.h</a></code> is supported. </td></tr>
<tr>
<td><span class="itemdef">wxHAS_RAW_KEY_CODES</span> </td><td>Defined if raw key codes (see <a class="el" href="classwx_key_event.html#a6fddcd170d05b0852a7eb2a0cb730795" title="Returns the raw key code for this event.">wxKeyEvent::GetRawKeyCode</a> are supported. </td></tr>
<tr>
<td><span class="itemdef">wxHAS_REGEX_ADVANCED</span> </td><td>Defined if advanced syntax is available in <a class="el" href="classwx_reg_ex.html" title="wxRegEx represents a regular expression.">wxRegEx</a>. </td></tr>
<tr>
<td><span class="itemdef">wxHAS_TASK_BAR_ICON</span> </td><td>Defined if <a class="el" href="classwx_task_bar_icon.html" title="This class represents a taskbar icon.">wxTaskBarIcon</a> is available on the current platform. </td></tr>
</table>
<h1><a class="anchor" id="page_cppconst_msvc_setup_h"></a>
Library Selection for MSVC</h1>
<p>Microsoft Visual C++ users may use the special <code>wx/setup.h</code> file for this compiler in <code>include/msvc</code> subdirectory. This file implicitly links in all the wxWidgets libraries using MSVC-specific pragmas which usually is much more convenient than manually specifying the libraries list in all of the project configurations. However sometimes linking with all the libraries is not desirable, for example because some of them were not built and this is where the symbols in this section can be helpful: defining them allows to not link with the corresponding library. The following symbols are honoured: </p>
<pre class="fragment">- wxNO_ADV_LIB
- wxNO_AUI_LIB
- wxNO_HTML_LIB
- wxNO_MEDIA_LIB
- wxNO_NET_LIB
- wxNO_PROPGRID_LIB
- wxNO_QA_LIB
- wxNO_RICHTEXT_LIB
- wxNO_WEBVIEW_LIB
- wxNO_XML_LIB
- wxNO_REGEX_LIB
- wxNO_EXPAT_LIB
- wxNO_JPEG_LIB
- wxNO_PNG_LIB
- wxNO_TIFF_LIB
- wxNO_ZLIB_LIB
</pre><p>Notice that the base library is always included and the core is always included for the GUI applications (i.e. those which don't define <code>wxUSE_GUI</code> as 0).</p>
<p>If the makefiles have been used to build the libraries from source and the <code>CFG</code> variable has been set to specify a different output path for that particular configuration of build then the <code>wxCFG</code> preprocessor symbol should be set in the project that uses wxWidgets to the same value as the <code>CFG</code> variable in order for the correct <code>wx/setup.h</code> file to automatically be included for that configuration.</p>
<h1><a class="anchor" id="page_cppconst_miscellaneous"></a>
Miscellaneous</h1>
<table class="doclist" border="1" cellspacing="0">
<tr>
<td><span class="itemdef">__WXWINDOWS__</span> </td><td>always defined in wxWidgets applications, see also wxCHECK_VERSION </td></tr>
<tr>
<td><span class="itemdef">wxDEBUG_LEVEL</span> </td><td>defined as 1 by default, may be pre-defined as 0 before including wxWidgets headers to disable generation of any code at all for the assertion macros, see <a class="el" href="overview_debugging.html">Debugging</a> </td></tr>
<tr>
<td><span class="itemdef">__WXDEBUG__</span> </td><td>defined if wxDEBUG_LEVEL is 1 or more, undefined otherwise </td></tr>
<tr>
<td><span class="itemdef">wxUSE_XXX</span> </td><td>if defined as 1, feature XXX is active, see the <a class="el" href="page_wxusedef.html">wxUSE Preprocessor Symbols</a> (the symbols of this form are always defined, use <span class="literal">#if</span> and not <span class="literal">#ifdef</span> to test for them) </td></tr>
<tr>
<td><span class="itemdef">WX_PRECOMP</span> </td><td>is defined if precompiled headers (PCH) are in use. In this case, <code>wx/wxprec.h</code> includes <code>wx/wx.h</code> which, in turn, includes a number of wxWidgets headers thus making it unnecessary to include them explicitly. However if this is not defined, you do need to include them and so the usual idiom which allows to support both cases is to first include <code>wx/wxprec.h</code> and then, inside <span class="literal">#ifndef</span> WX_PRECOMP, individual headers you need.} </td></tr>
<tr>
<td><span class="itemdef">_UNICODE and UNICODE</span> </td><td>both are defined if wxUSE_UNICODE is set to <code>1</code> </td></tr>
<tr>
<td><span class="itemdef">wxUSE_GUI</span> </td><td>this particular feature test macro is defined to 1 when compiling or using the library with the GUI features activated, if it is defined as <code>0</code>, only wxBase is available. </td></tr>
<tr>
<td><span class="itemdef">wxUSE_BASE</span> </td><td>only used by wxWidgets internally (defined as 1 when building wxBase code, either as a standalone library or as part of the monolithic wxWidgets library, defined as 0 when building GUI library only) </td></tr>
<tr>
<td><span class="itemdef">wxNO_RTTI</span> </td><td>is defined if the compiler RTTI support has been switched off </td></tr>
<tr>
<td><span class="itemdef">wxNO_EXCEPTIONS</span> </td><td>is defined if the compiler support for C++ exceptions has been switched off </td></tr>
<tr>
<td><span class="itemdef">wxNO_THREADS</span> </td><td>if this macro is defined, the compilation options don't include compiler flags needed for multithreaded code generation. This implies that wxUSE_THREADS is 0 and also that other (non-wx-based) threading packages cannot be used neither. </td></tr>
<tr>
<td><span class="itemdef">WXMAKINGDLL_XXX</span> </td><td>used internally and defined when building the library <code>XXX</code> as a DLL; when a monolithic wxWidgets build is used only a single <code>WXMAKINGDLL</code> symbol is defined </td></tr>
<tr>
<td><span class="itemdef">WXUSINGDLL</span> </td><td>defined when compiling code which uses wxWidgets as a DLL/shared library </td></tr>
<tr>
<td><span class="itemdef">WXBUILDING</span> </td><td>defined when building wxWidgets itself, whether as a static or shared library </td></tr>
</table>
</div></div><!-- contents -->
<address class="footer">
<small>
Generated on Thu Nov 27 2014 13:46:42 for wxWidgets by <a href="http://www.doxygen.org/index.html" target="_new">Doxygen</a> 1.8.2
</small>
</address>
<script src="wxwidgets.js" type="text/javascript"></script>
</div><!-- #page_container -->
</body>
</html>
|