compiling wxwidgets 2.8.6 to develop code::blocks (msw) - codeblocks
DESCRIPTION
Compilation de wxWidgets Frameworks.TRANSCRIPT
-
2/6/15, 07:41Compiling wxWidgets 2.8.6 to develop Code::Blocks (MSW) - CodeBlocks
Page 1 of 3http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)&printable=yes
Compiling wxWidgets 2.8.6 to developCode::Blocks (MSW)From CodeBlocks
These are the instructions for compiling wxWidgets for use with Code::Blocks. They are primarily intended inpreparation for compiling Code::Blocks itself but (hopefully) may also help installing wxWidgets for generaldevelopment using that framework.
Although these instructions are targeted at the Windows operating system, it should be possible to apply themwith slight adjustments to other platforms, since we make use of MinGW.
Contents1 Installing MinGW2 Installing the wxWidgets Source Code3 Checking make Version4 Building wxWidgets5 Compiling Code::Blocks
5.1 Setting up paths5.2 Post compilation steps
Installing MinGWDirections to install MinGW for Code::Blocks can be found here. MinGW installation
Installing the wxWidgets Source CodeThe wxWidgets 2.8.6 distribution can be found at the wxWidgets download site(http://www.wxwidgets.org/downloads/#previous_stable) . (Note that there is also a winhelp file available.)You can choose between an installer and a zip file. You can just get the zip file because the installer is also azipped version.
If you use the plain zip version, make sure to unzip using the full path. Otherwise the directories won't becreated correctly.
The future patches for wxWidgets 2.8.6 distribution will be found at the wxWidgets download site(http://www.wxwidgets.org/downloads/patch.htm) .
NOTE: For the remainder of these instructions we call the wxWidgets directory . You have tochange it to your corresponding directory (e.g. "c:\wxMSW-2.8.6-1\wxWidgets-2.8.6").
NOTE: You do not need MSYS. Furthermore, you cannot have MSYS in your path, or the wxWidgets
http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)&printable=yes#Installing_MinGWhttp://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)&printable=yes#Installing_the_wxWidgets_Source_Codehttp://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)&printable=yes#Checking_make_Versionhttp://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)&printable=yes#Building_wxWidgetshttp://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)&printable=yes#Compiling_Code::Blockshttp://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)&printable=yes#Setting_up_pathshttp://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)&printable=yes#Post_compilation_stepshttp://wiki.codeblocks.org/index.php?title=MinGW_installationhttp://www.wxwidgets.org/downloads/#previous_stablehttp://www.wxwidgets.org/downloads/patch.htm
-
2/6/15, 07:41Compiling wxWidgets 2.8.6 to develop Code::Blocks (MSW) - CodeBlocks
Page 2 of 3http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)&printable=yes
compilation will fail. Thus, if you have MSYS installed, ensure that \bin is not in your path beforecompiling wxWidgets. wxWidgets must be compiled from a "regular" command line (like cmd.exe), not froma Unix-like shell. The same problem could arise if Cygwin is in the path.
NOTE: For the remainder of these instructions we call the MinGW directory . You have to changeit to your corresponding directory (e.g. "C:\MinGW").
Checking make VersionIf you didn't install MinGW yourself you have to ensure you are using a recent enough version of the makeutility. Open a command prompt and type:
cd /D \binmingw32-make -v
The version should read 3.80 or higher.
NOTE: the /D flag after cd may be omitted from all commands; it simply allows command prompt to changedrives if necessary.
Building wxWidgetsTo compile wxWidgets, open the command prompt window and change to the wxWidgets directory:
cd /D \build\msw
SET PATH=\bin;\mingw32\bin
NOTE: This is normally SET PATH=C:\MingGW\bin;C:\MingGW\mingw32\bin
Now clean up the source:
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release clean
NOTE: Make sure you use exactly the same options for this step and for the build step below. The cleantarget uses these variables and only cleans the specified version of the generated object and library files. (Itwill not clean the intended files if these variables are not identical.)
NOTE: If you still have problems with compiling after cleaning, you could try to manually remove thegcc_msw directory under the build\msw directory. This directory is the place where the object files are stored.
When everything is clean you can start compiling wxWidgets:
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release
NOTE: These options are the officially-supported Code::Blocks options. If you want another version ofwxWidgets (debug or non-Unicode) you still have to make sure you build a MONOLITHIC version (one big
-
2/6/15, 07:41Compiling wxWidgets 2.8.6 to develop Code::Blocks (MSW) - CodeBlocks
Page 3 of 3http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)&printable=yes
DLL) for linking Code::Blocks.
Patience. This step takes time. Make sure there was no compilation error before you continue.
NOTE: If you're having errors because of libjpeg, you might want to look at this patch(http://sourceforge.net/tracker/?func=detail&atid=309863&aid=1606032&group_id=9863)
Compiling Code::Blocks
Setting up paths
Before finally compiling Code::Blocks itself, you need to setup the paths:
Open the Code::Blocks project (CodeBlocks.cbp).It will ask you to define a Global variableSet the path to where you have wxWidgets installed (e.g. "c:\wxMSW-2.8.6-1\wxWidgets-2.8.6").Compile Code::Blocks.
Post compilation steps
When the compilation process is finished, simply run the update.bat script. It will ensure that all resource filesCode::Blocks uses are in the right place and up to date.
Retrieved from "http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)"
This page was last modified on 21 September 2011, at 23:05.
http://sourceforge.net/tracker/?func=detail&atid=309863&aid=1606032&group_id=9863http://wiki.codeblocks.org/index.php?title=Global_compiler_variableshttp://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)