1. Install a drive under the root directory, for example: D:\ wxWidgets-2.9.4 Directory
2. Compiling
In D:\WXWIDGETS-2.9.4\BUILD\MSW\MAKEFILE.GCC
File at the beginning plus Shell=cmd.exe
============================================================
Add Shell=cmd.exe Reason:
Compiling wxwidgets is a very simple thing, but recently encountered some problems in compiling.
The error message resembles the following result:
If not exist. /.. /LIB/GCC_LIB/MSWUD/WX mkdir. /.. /lib/gcc_lib/mswud/wx
Process_begin:createprocess (NULL,-C "if not exist: /.. /LIB/GCC_LIB/MSWUD/WX mkdir. /.. /lib/gcc_lib/mswud/wx ", ...) Failed.
Make (e=2)
The reason for the error is that because Msys is installed, the make command executes the shell command in Msys first, causing a compilation error, and in this case, modifying the MAKEFILE.GCC file to use the cmd command line by default.
MAKEFILE.GCC modified before: SHELL: = $ (COMSPEC)
Static link (Debug version) ============================================================
D:\wxWidgets-2.9.4\build\msw\config.gcc
SHARED? = 0
UNICODE? = 1
BUILD? = Debug
A shared 0 means that a static library is to be compiled, not a dynamic library (shared library), and Unicode is 1, which is to be compiled into a Unicode version, which is always 1 during this compilation. Build is debug, which represents the version to compile into containing debug information.
Cmd:
D:
CD WXWIDGETS-2.9.4\BUILD\MSW
Mingw32-make.exe-f MAKEFILE.GCC
Or
Cmd:
D:
CD WXWIDGETS-2.9.4\BUILD\MSW
Mingw32-make-f MAKEFILE.GCC shared=0 unicode=1 build=debug
Static link (release version) ============================================================
The main difference between the compilation process and the previous version is the modification of the "CONFIG.GCC" file:
SHARED? = 0
UNICODE? = 1
BUILD? = Release
Other methods of operation are not changed.
Or
Cmd:
D:
CD WXWIDGETS-2.9.4\BUILD\MSW
Mingw32-make-f MAKEFILE.GCC shared=0 unicode=1 build=release
Dynamic Link (Debug version) ============================================================
The main difference between the compilation process and the previous version is the modification of the "CONFIG.GCC" file:
SHARED? = 1
UNICODE? = 1
BUILD? = Debug
Other methods of operation are not changed.
Or
Cmd:
D:
CD WXWIDGETS-2.9.4\BUILD\MSW
Mingw32-make-f MAKEFILE.GCC shared=1 unicode=1 build=debug
Dynamic Link (release version) ============================================================
The main difference between the compilation process and the previous version is the modification of the "CONFIG.GCC" file:
SHARED? = 1
UNICODE? = 1
BUILD? = Release
Other methods of operation are not changed.
Or
Cmd:
D:
CD WXWIDGETS-2.9.4\BUILD\MSW
Mingw32-make-f MAKEFILE.GCC shared=1 unicode=1 build=release
To ensure that the compilation is completed as smoothly as possible, only the most basic compilation options are selected in "CONFIG.GCC". Therefore, some powerful wxwidgets function modules are not compiled into libraries, such as the non-Unicode version mentioned earlier, there is no support for OpenGL, OBDC and other functions. When needed later, we will add, and reassure everyone, that this does not lead to another wxwidgets long full compilation.
After the compilation is complete, all the static link libraries are located in the "Lib\gcc_lib" subdirectory of the wxwidgets installation directory. The dynamic-link library is located in the "Lib\gcc_dll" subdirectory.
Careful observation, you will find that the library file name, there are many "UD" letter files, where ' d ' means "debug", that is, debug version, without ' d ' is usually "release" version. ' U ' means "Unicode", which supports Unicode encoding. Although we compile all this time with the "Unicode" option, there are still some files that do not have ' u ' letters, because these libraries do not involve the internationalization of strings, so there is no need to consider coding, such as libraries related to JPEG graphics functionality.
In the Gcc_dll directory, in addition to the dynamic-link library with the extension ". dll", there are a number of files that are extended to ". A", called "Import libraries/import Library".
Mingw32-make-f makefile.gcc build=release shared=1 use_opengl=1 use_odbc=1
Mingw32-make-f makefile.gcc build=debug shared=1 use_opengl=1 use_odbc=1
Wxwidgets Installation and compilation