|
MinGW is a GNU toolset that includes Windows headers and import libraries for building Windows applications. MSYS provides an environment closely resembling a Linux or Unix shell in which to use MinGW. The process for using MinGW is very similar to the process described later for GCC. It is recommended that you create a subdirectory within the wxWidgets directory for each configuration that you want to build. Most developers create directories using the same naming conventions as wxWidgets; if you want to compile the library in Unicode debug mode, you might create a directory named buildud or build26ud depending on how many different configurations you want to have. After you have created your build directory, change into the build directory. The configure script, now located one directory up, takes many different parameters, the most important ones being those that control the main build options. For example, you could run ../configure --enable-unicode --disable-debug --disable-shared --disable-monolithic The configure script will analyze the build environment and then generate the makefiles for use with MinGW. When configure has finished, it will display a summary of the library build configuration. Configured wxWidgets 2.6.0 for `i686-pc-mingw32' Which GUI toolkit should wxWidgets use? msw Should wxWidgets be compiled into single library? no Should wxWidgets be compiled in debug mode? no Should wxWidgets be linked as a shared library? no Should wxWidgets be compiled in Unicode mode? yes What level of wxWidgets compatibility should be enabled? wxWidgets 2.2 no wxWidgets 2.4 yes Which libraries should wxWidgets use? jpeg builtin png builtin regex builtin tiff builtin zlib builtin odbc no expat builtin libmspack no sdl no Many other individual features can be enabled or disabled using the configure script, a list of which can be found in the wxWidgets documentation or by passing --help to the configure script. After configure has generated the makefiles, build the library by running make in the same directory as the one in which you ran configure. The compiled library files are placed in the lib subdirectory of the directory used for the build, not the lib directory at the root of the wxWidgets tree. You may optionally use make install as root after the build has completed, to copy the library and the necessary headers into /usr/local so that all users may have access to compile, build, and run wxWidgets programs. Compiling a wxWidgets Sample ProgramThe configure script creates a samples directory in your build directory, with further subdirectories for each sample. If you change into one of the sample program directories, you will see a makefile, which has been generated for your build directory and build configuration. Run make to build the sample. For example: cd /c/wx/build26ud/samples/minimal make ./minimal |
|