News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

compiling Code::Blocks

Started by wobien, December 13, 2007, 02:50:49 PM

Previous topic - Next topic

wobien

I tried to compile C::B on winXP (out of curiosity, the nightly's work fine for me).
Until now I did this:
I downloaded wxWidgets (guided by the wiki "Compiling wxWidgets 2.8.6 to develop Code::Blocks (MSW)")
I downloaded minGW 3.4.5 (guided by the wiki "MinGW installation")
I compiled wxWidgets
I tested this in C::B by making a wxWidgets "hallo world". It compiles and runs fine.
I downloaded and installed Tortoise SVN (guided by the last chapter in the manual)
I downloaded all the C::B source files whith SVN

Now I have some questions:

1. The manual tells me I need a zip.exe command line and promises a link to a download site. But the link is not there. I tried to find a zip.exe command line with Google, and got many hits, but did not succeed to download anything. 7 zip has a commandline version, but it is called 7za.exe
Can i use that? If not, where can I download zip.exe?

2. The manual tells me I must run update_revision.bat
I cannot find that amongst the files I have got. There is a update_revision.sh, but I understand that is for Linux.
How do I get update_revision.bat?

3. Coming from DevCpp I had minGW 3.4.2 in my DevCpp folder when I first downloaded C::B, it was promptly found, and until now I happily used it with C::B.
I tried to find out what to do to make C::B use the new version. There is a wiki "Installing a supported compiler" stating:
Quote"Settings/Configure plugins/Compiler", select the compiler you installed, switch to the "Programs" page and press "Auto-detect". If you get a message saying that the compiler was auto-detected, congratulations! If not, then press the button with the three dots next to the "Auto-detect" button and select the installation directory of your compiler manually.

But this is probably outdated, I can't find this in C::B.
How must I do this?
wobien

edit: I just found out how to solve my question 3: "Settings->Compiler and Debugger->Global compiler settings->Toolchain executables" in stead of "Settings/Configure plugins/Compiler". "switch to the "Programs" page" can be left out.
Can I change the wiki?

edit 2: In wiki "Nightly Cookbook" is the same information I found in the manual, last chapter. But this time with the link to the download page for zip.exe.
that solves my question 1.

stahta01

Feel free to edit the Wiki.

Note, we are using the newest version of wxWidgets which I think is 2.8.7.

Tim S
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

wobien

Quote from: stahta01 on December 13, 2007, 04:48:14 PM
Note, we are using the newest version of wxWidgets which I think is 2.8.7.
I downloaded wxWidgets 2.8.7
In the Nightly Cookbook Wiki is a link to a patch for wxWidgets 2.6.3. Do I have to apply that patch to version 2.8.7 to?

The Nightly Cookbook dosn't talk about update_revision.bat (my question 2), so I skipped that and tried to compile C::B.
C::B is compiled, but on compiling the Code Stat project I get an error:
Quote-------------- Build: default in Code Stat ---------------

Compiling: codestatconfig.cpp
In file included from <command line>:10:
C:/CodeBlocksSDK/codeblocks-1.0rc2-sdk/include/sdk.h:64:32: wx/wxscintilla.h: No such file or directory
In file included from C:/CodeBlocksSDK/codeblocks-1.0rc2-sdk/include/sdk_events.h:7,
                 from C:/CodeBlocksSDK/codeblocks-1.0rc2-sdk/include/sdk.h:70,
                 from <command line>:10:
And yes, the compiler is dead right: there is no file called wxscintilla.h in my wxWidgets folders.
How do I get this file?

Auria

Don't try building rc2, it's outdated! Use a recent version

Jenna

You can conmpile the plain wxWidgets 2.8.7 as decribed in the cookbook for 2.6.3.
Use the same commands ("mingw32-make" must be in the searchpath).
Do the compile for the "debug" and the "release" target.

Copy the two new dll's from "lib/gcc_dll" to "c:\windows\system32" (XP) or "c:\winnt\system32".
It should work if they are in the searchpath, but this is (in my opinion) the safest way to make it work.

Start your C::B. Go to "Settings -> Global variables..." and set "wx" to your wxWidgets2.8.7 base-directory (normally "c:\wxWidgets-w.8.7") and "cb" to the first "src"-directory in the codeblocks source-tree.
Download the zip-tool from the Url you find in the cookbook under "ZIP". Put the zip.exe in a directory that is in the searchpath.
Right-click the "CodeBlocks.cbp"-file in the first src-dir from source-tree, and start the build (or the rebuild) if it's finished do the same with the appropriate "ContribPlugins.workspace" file.
If it's finished open the console and "cd" into the src-dir in the codeblocks-source-tree and run "update.bat".
To test the fresh C::B double-click the codeblocks.exe in the output subdir. If everything works, you can delete the old C::B nightly and replace it with the files from the output-dir.

Edit:

I hope I did not forget anything. If so please ask.

wobien

It worked!
Thanks for your help, jens.
Your post helped me to check every step again and find what went wrong.
It was the global variable for codeblocks: I chose the wrong folder there.
That is why the file wxscintilla.h could not be found: it is in the codeblocks include folder!
wobien