Compile wxWidgets in Unicode mode
After unpacking the zip file to a directory of your choice, open a cmd prompt, and navigate to the folder build/msw inside the wxWidgets folder. Use the following commands to compile wxWidgets:set path=c:\mingw\bin;c:\mingw\mingw32\bin
mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 clean
mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
This assumes your MinGW installation is in C:\mingw. Use a different path if you installed MinGW somewhere else.
You will see a lot of warning messages during compilation. Don't worry, this is normal, you are compiling wxWidgets. The build process may take 10-30 minutes, depending on your computer's speed.
If you are using a recent version of MinGW you may find that the object files are too large and that the linker runs out of memory. To fix this problem you need to edit config.gcc so that inline functions are not exported, by modifying the CFLAGS and CXXFLAGS lines to: CFLAGS ?= -fno-keep-inline-dllexport
CXXFLAGS ?= -fno-keep-inline-dllexport
remark: If you want to use wxWidgets not only for building Code::Blocks, but also for writing wxWidgets programs, and if you want to use the debugger in those programs, you have to compile a debug build of wxWidgets as well. Use the same commands as for the release build, but replace "release" by "debug".
Optional:
To reduce the size of your wxWidgets library, you can disable features which are not used by Code::Blocks. However, you should not do this unless you know what you are doing. You have to delete the generated setup.h from lib/gcc_dll/msw/wx before building, because your changes to include/wx/msw will otherwise not be honoured.
After unpacking the zip file to a directory of your choice, open a cmd prompt, and navigate to the folder build/msw inside the wxWidgets folder. Use the following commands to compile wxWidgets:set path=c:\mingw\bin;c:\mingw\mingw32\bin
mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 clean
mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
This assumes your MinGW installation is in C:\mingw. Use a different path if you installed MinGW somewhere else.
You will see a lot of warning messages during compilation. Don't worry, this is normal, you are compiling wxWidgets. The build process may take 10-30 minutes, depending on your computer's speed.
If you are using a recent version of MinGW you may find that the object files are too large and that the linker runs out of memory. To fix this problem you need to edit config.gcc so that inline functions are not exported, by modifying the CFLAGS and CXXFLAGS lines to: CFLAGS ?= -fno-keep-inline-dllexport
CXXFLAGS ?= -fno-keep-inline-dllexport
remark: If you want to use wxWidgets not only for building Code::Blocks, but also for writing wxWidgets programs, and if you want to use the debugger in those programs, you have to compile a debug build of wxWidgets as well. Use the same commands as for the release build, but replace "release" by "debug".
Optional:
To reduce the size of your wxWidgets library, you can disable features which are not used by Code::Blocks. However, you should not do this unless you know what you are doing. You have to delete the generated setup.h from lib/gcc_dll/msw/wx before building, because your changes to include/wx/msw will otherwise not be honoured.


