The easy way
As of version 1.0.2419, CodeLite offers a new Windows installer which bundles MinGW, CodeLite IDE and pre-compiled binaries for wxWidgets 2.8.X which includes all the header files and libraries required for developing with wxWidgets.
So, to get started developing a wxWidgets application on Windows all that needs to be done is downloading the full installer (about 30MB) from here:
CodeLite Installer With wxWidgets and MinGW - while writing this document, the up-to-date version is 184.108.40.20689, this might change by the time you read this document, so check sourceforge for a more recent version of codelite.
- Install CodeLite and you are done
The "Do-It-Yourself" way
Step 1: Download wxWidgets
- Download wxWidgets source from here. We recommend you download the zip version of wxMSW.
- Extract the archive (after extraction, you might want to move the extracted files to a more straight-forward directory name, like c:\wx\wx288 - sub-directories of this folder will be include, src, and so forth).
Step 2: Build wxWidgets
- Open the command prompt (Start > Run... > cmd).
- Go to the build\msw folder of your wxWidgets directory, e.g. C:\wx\wx288\build\msw.
- You can now build the library using, for example:
mingw32-make -f makefile.gcc UNICODE=1 SHARED=1 MONOLITHIC=1 BUILD=debug
Notice the various parameters passed to make program. A list of important parameters are available here: wxWidgets Build Parameters.
Step 3: Configure CodeLite
- Open Settings > Environment Variables
- Add the following variables:
- WXWIN - this points to your main wxWidgets directory, e.g. C:\wx\wx288
- WXCFG - this points to the path containing the configuration file for the current build.
For example, if build.cfg is under C:\wx\wx288\lib\gcc_dll\mswud, you'd need to set WXCFG to gcc_dll\mswud.