Author Topic: compiling Code::Blocks  (Read 4105 times)

Offline wobien

  • Multiple posting newcomer
  • *
  • Posts: 69
compiling Code::Blocks
« on: December 13, 2007, 02:50:49 pm »
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.
« Last Edit: December 13, 2007, 04:42:41 pm by wobien »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: compiling Code::Blocks
« Reply #1 on: December 13, 2007, 04:48:14 pm »
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++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline wobien

  • Multiple posting newcomer
  • *
  • Posts: 69
Re: compiling Code::Blocks
« Reply #2 on: December 13, 2007, 06:32:46 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?

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: compiling Code::Blocks
« Reply #3 on: December 13, 2007, 06:42:21 pm »
Don't try building rc2, it's outdated! Use a recent version

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: compiling Code::Blocks
« Reply #4 on: December 13, 2007, 06:57:45 pm »
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.

Offline wobien

  • Multiple posting newcomer
  • *
  • Posts: 69
Re: compiling Code::Blocks
« Reply #5 on: December 14, 2007, 12:04:40 am »
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