<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=TheTypz</id>
	<title>Code::Blocks - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=TheTypz"/>
	<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php/Special:Contributions/TheTypz"/>
	<updated>2026-05-26T12:04:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.2_to_develop_Code::Blocks_(MSW)&amp;diff=112</id>
		<title>Compiling wxWidgets 2.6.2 to develop Code::Blocks (MSW)</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.2_to_develop_Code::Blocks_(MSW)&amp;diff=112"/>
		<updated>2005-07-30T23:28:10Z</updated>

		<summary type="html">&lt;p&gt;TheTypz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These are the instructions to compile wxWidgets do you can compile Code::Blocks on your own.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' These instructions are MS Windows (TM) specific, but because we are using MinGW it should be possible to use these instructions with some modifications on other platforms.&lt;br /&gt;
&lt;br /&gt;
== Install MinGW ==&lt;br /&gt;
If you don't have the Code::Blocks + MinGW bundle, grab the latest MinGW stuff from the [http://www.mingw.org/download.shtml#hdr2 MinGW site] and install it under a directory you like.&lt;br /&gt;
'''NOTE:''' In these instroctions we're calling the MinGW directory &amp;lt;MINGW&amp;gt;, so you have to replace that with you're own directory.&lt;br /&gt;
&lt;br /&gt;
'''If you DO have the Code::Blocks + MinGW bundle, or have already installed MINGW on your own, you can skip this section.'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' The files are compressed in the tar.gz format. You need a third-party extraction utility to unzip them. (like 7-zip)&lt;br /&gt;
&lt;br /&gt;
You need at least the following files:&lt;br /&gt;
* [http://prdownloads.sf.net/mingw/gcc-core-3.4.2-20040916-1.tar.gz?download gcc-core-3.4.2-20040916-1.tar.gz]&lt;br /&gt;
* [http://prdownloads.sf.net/mingw/gcc-g++-3.4.2-20040916-1.tar.gz?download gcc-g++-3.4.2-20040916-1.tar.gz]&lt;br /&gt;
* [http://prdownloads.sf.net/mingw/mingw-runtime-3.7.tar.gz?download mingw-runtime-3.7.tar.gz]&lt;br /&gt;
* [http://prdownloads.sf.net/mingw/mingw-utils-0.3.tar.gz?download mingw-utils-0.3.tar.gz]&lt;br /&gt;
* [http://prdownloads.sf.net/mingw/w32api-3.2.tar.gz?download w32api-3.2.tar.gz]&lt;br /&gt;
* [http://prdownloads.sf.net/mingw/binutils-2.15.91-20040904-1.tar.gz?download binutils-2.15.91-20040904-1.tar.gz]&lt;br /&gt;
* [http://prdownloads.sf.net/mingw/mingw32-make-3.80.0-3.exe?download mingw32-make-3.80.0-3.exe]&lt;br /&gt;
* [http://prdownloads.sf.net/mingw/gdb-5.2.1-1.exe?download gdb-5.2.1-1.exe]&lt;br /&gt;
GDB is not really needed, but could be usefull for debugging.&lt;br /&gt;
&lt;br /&gt;
After you install, make sure you have the following directories under your path:&lt;br /&gt;
* &amp;lt;MINGW&amp;gt;\bin;&lt;br /&gt;
* &amp;lt;MINGW&amp;gt;\mingw32\bin;&lt;br /&gt;
&lt;br /&gt;
== Download and Install the wxWidgets source code ==&lt;br /&gt;
The wxWidgets 2.6.1 distribution can be found at the [http://www.wxwidgets.org/dl_msw2.htm#stable wxWidgets website]. (Note that ther e is also a winhelp file available.) You can get choose between an installer and a zip file. You can just get the zip file because the installer is also a zipped version.&lt;br /&gt;
&lt;br /&gt;
If you use the plain zip version, make sure to unzip using the full path. Otherwise the directories won't be created correctly.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' In the rest of these instructions we are calling the wxWidgets directory &amp;lt;WXWIN&amp;gt; you have to change it to your own directory. (e.g. &amp;quot;c:\wxWidgets-2.6.1&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' you do not need MSYS. Furthermore, you cannot have MSYS in your path, or the wxWidgets compilation will fail. Thus if you have MSYS installed, ensure that &amp;lt;MSYS&amp;gt;\bin '''is not''' in your path before compiling wxWidgets. wxWidgets must be compiled from a &amp;quot;regular&amp;quot; command line (cmd.exe), not from a unix-like shell. BTW, The same problem would probably arise as well if cygwin is in the path.&lt;br /&gt;
&lt;br /&gt;
== Check make version ==&lt;br /&gt;
If you didn't install MingW yourself you have to make sure you have the right version of make. Open the command prompt and type:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -v&amp;lt;/tt&amp;gt;&lt;br /&gt;
If the version is 3.80 or greater it is allright to go on, else you have to install the new make.&lt;br /&gt;
&lt;br /&gt;
== Building wxWidgets ==&lt;br /&gt;
Now it is time to compile wxWidgets, open the command promt and change to the wxWidgets directory:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd &amp;lt;WXWIN&amp;gt;\build\msw&amp;lt;/tt&amp;gt;&lt;br /&gt;
Now we are on the right place we are first going to clean up the source:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc clean&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' if you still have problems with compiling after cleaning, you may want to remove the directory in the build\msw directory. (it contains object files...)&lt;br /&gt;
When everything is clean we can compile wxWidgets:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 VENDOR=cb&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' these options are the official Code::Blocks options. When you want another version of wxWidgets (unicode or debug) you have to make sure you build a MONOLITHIC version. (One big dll)&lt;br /&gt;
Now you can get a cup of coffee, or do something else, because this could take a long time.&lt;br /&gt;
&lt;br /&gt;
== Build the STC library ==&lt;br /&gt;
If you closed the command promt, you have to open it again.&lt;br /&gt;
We are going to the STC directory&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd ..\..\contrib\build\stc&amp;lt;/tt&amp;gt;&lt;br /&gt;
We clean the source:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc clean&amp;lt;/tt&amp;gt;&lt;br /&gt;
And we going to compile it. Make sure you have the same build options as before.&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 VENDOR=cb&amp;lt;/tt&amp;gt;&lt;br /&gt;
So now everything is compiled for using codeblocks.&lt;br /&gt;
&lt;br /&gt;
== Copy libraries ==&lt;br /&gt;
When compilation is finished it is usefull to copy the libs to another directory. By doing this you can make several builds (e.g. debug and release).&lt;br /&gt;
* So first we create a directory this could be done in &amp;lt;WXWIN&amp;gt;\lib.&lt;br /&gt;
* Then we go to the directory &amp;lt;WXWIN&amp;gt;\lib\gcc_dll (could called diffrent when you changed the build options)&lt;br /&gt;
* Now we move all the files (.a .dll) and the directory (msw) to the directory of your choice. (for me it is &amp;lt;WXWIN&amp;gt;\lib\codeblocks)&lt;br /&gt;
'''NOTE:''' Make sure you everything is removed from the directory &amp;lt;WXWIN&amp;gt;\lib\gcc_dll else you can get trouble when compiling another version.&lt;br /&gt;
&lt;br /&gt;
== Setting up paths ==&lt;br /&gt;
Everything is done now, and we can start compiling Code::Blocks, couldn't we? No! First we have to setup the paths.&lt;br /&gt;
Open the codeblocks project (CodeBlocks-wx2.6.0.cbp) and go to the Build options.&lt;br /&gt;
From there you have to go to the tab Directories and Compiler. Here you have to add the following paths (Remember to replace &amp;lt;WXWIN&amp;gt;)&lt;br /&gt;
* &amp;lt;WXWIN&amp;gt;\lib\codeblocks\msw&lt;br /&gt;
* &amp;lt;WXWIN&amp;gt;\include&lt;br /&gt;
* &amp;lt;WXWIN&amp;gt;\contrib\include&lt;br /&gt;
The first path is used to find the right setup.h for the build you are using. The other two are for the normal include files.&lt;br /&gt;
&lt;br /&gt;
Now go to the Linker tab and add the following path:&lt;br /&gt;
* &amp;lt;WXWIN&amp;gt;\lib\codeblocks&lt;br /&gt;
'''NOTE:''' You have to replace this with the directory of your own choice in the previous section!&lt;br /&gt;
&lt;br /&gt;
Finally, go to the resource tab and add the following path (Remember to replace &amp;lt;WXWIN&amp;gt;)&lt;br /&gt;
* &amp;lt;WXWIN&amp;gt;\include&lt;br /&gt;
&lt;br /&gt;
Now you are finished with the configuration and you can hit the compile button (CTRL-F9). Be aware that Code::Blocks is not officially  support wxWidgets 2.6.1 so it is possible that new files are not yet in the project. You have to do this by your self.&lt;br /&gt;
&lt;br /&gt;
== Post compilation steps (before running C::B) ==&lt;br /&gt;
&lt;br /&gt;
When compilation process is finished, simply run the update.bat script. It will ensure that all resource files (that C::B uses) are in the right place and up to date.&lt;br /&gt;
&lt;br /&gt;
Note: This step requires appropriate zip command, which you likely have already set up and working. However, in case you have not, you should find something usable  [ftp://ftp.uu.net/pub/archiving/zip/WIN32/ here].&lt;/div&gt;</summary>
		<author><name>TheTypz</name></author>
	</entry>
</feed>