This assume that {$WXWIN} is where you install your wxWidgets (e.g. 'C:\wx').
1. Download wxWidgets and Unarchive it into a directory without *space* (e.g. 'C:\wx' or 'C:\wxWidgets_2_5_2').
And this directory is refer as a {$WXWIN}. Please note that wxWidgets can't handle a directory contain 'space'.
2. All makefiles and projects are locate in directory '{$WXWIN}\build\msw'. There are some make files for several Compiler,
such as Visual C++, Borlanc C++, Watcom and GCC.
3. For VC++ user, just open wx.dsw in '{$WXWIN}\build\msw' which has configurations for static compilation (lib) or DLL compilation (dll).
- Each of these available in Unicode/ANSI, Debug/Release and wxUniversal or native variations. Normally you'll use a static linking ANSI configuration.
- Choose the Win32 Debug or Win32 Release configuration (or any other) and use Batch Build to compile _all_ projects.
4. Before you build your wxWidgets please do some modify for SETUP.H first.
Simply click any project in your wx.dsw, look for setup.h
(all projects using the setup.h) and edit it. These are some guide lines:
-If this is your first time to use wxWidgets, set these to zero (0).
WXWIN_COMPATIBILITY_2_2 & wxDIALOG_UNIT_COMPATIBILITY
-If you plan to Database in future, set this to One (1).
wxUSE_ODBC
Click here for more information about Setup.h
5. After successful compilation, you will find wx library in these directories:
| {$WXWIN}\lib\vc_lib |
VC++ compiled static libraries |
| {$WXWIN}\lib\vc_dll |
VC++ DLLs |
| {$WXWIN}\lib\bcc_lib |
Static libraries for Borland C++, if your are using BC++ |
6. These directories also contain subdirectory with wx/setup.h header. This subdirectory is named after port, Unicode, wxUniv and debug settings and
you *must* add it to include paths when compiling your application. Some examples:
| {$WXWIN}\lib\vc_lib\msw\wx\setup.h |
VC++ static, wxMSW |
| {$WXWIN}\lib\vc_lib\mswd\wx\setup.h |
VC++ static, wxMSW, Debug |
| {$WXWIN}\lib\vc_lib\mswud\wx\setup.h |
VC++ static, Unicode, Debug |
7. Add WXWIN into your Environment variable,
For Windows XP, Go to 'My Computer->Properties->Advanced->Environment Variables',
add 1 line with
Name= 'WXWIN',
Value= 'C:\wx'
8. Add Include path and library into your VC++.
Tools->Options->Directories
-Include files
---C:\wx\include
-Library files'
---C:\wx\lib\vc_lib
| System used |
| OS |
WinXP |
| Tools |
MSVC++ 6.0 |
|