Code::Blocks

Introduction:
Code::Blocks is an open source Integrated Development Environment (IDE). This will aid you compiling and debugging C and C++ programs.
This page will help you download the Code::Blocks IDE installation file (which includes the complier and debugger).

Instruction Guide:
There is also a guide to help you setup and use Code::Blocks. Please click here to download our instruction guide for Code::Blocks.
A complete manual is available from the Code::Blocks website.

Libraries for GLUT:
For students taking CIS 41: Here is a guide to using GLUT in Code::Blocks.

Libraries for OpenGL 3.0:
For students taking a class using OpenGL 3.0: Here is a guide to using OpenGL 3.0 in Code::Blocks.
You will need to download the code.zip file as well.

C++ Reference Page. When you install Code Blocks, you can access this information via Help, C++ Reference.


Download Information:
Please select your Operating System:
Installing Code::Blocks


Microsoft Windows Install:
Click here to go to a download page for Code::Blocks for Windows.
Should the system ask you to select a compiler, please select MinGW.


If you are using the Mac OS, you will need to do the following two steps to install Codeblocks and Xcode:

  1. Install Xcode Command Line for your version of Mac OS X (10.7 is Lion, 10.8 is Mountain Lion). You can obtain Xcode Command Line Version here:
    http://developer.apple.com/downloads/
    It will ask if you to login with your Apple ID (if you don't have one you click on the Register button)
    Once you have logged in, in the search box on the left type in: xcode
    Near the top of the search results you will see Xcode Command Line tools. Please select the appropriate version to download. Once it has downloaded, install it. Once installed your computer will now have the gcc and g++ compilers for C and C++.

WARNING!
If you are a Mac user, you may encounter two problems:


1. Typing a key activates a keyboard shortcut rather than typing the key. This is a known bug with the new release. To fix please try the following:

From the menu, choose Plugins
Choose the bottom entry "Manage Plugins"
Scroll down the list and highlight "Keyboard Shortcuts" and then from the right side choose "Disable"

Restart CodeBlocks and all should work.

2. Problems printing from within CodeBlocks:
This was a problem with the previous release and may have not been fixed in the new version. If you have trouble printing from within CodeBlocks, you may do one of the following:

a. File, Export, As PDF. Then open the PDF and print that. The last character in your file will not be printed, so please have a blank line at the end.
b. Copy your program from within CodeBlocks and paste it into a text editor or word processor and print from there.

On newer Macs, you may need to go to System Preferences > Security & Privacy > General. Then change in "Allow Applications Downloaded From" settings to "Anywhere". After installing Code::Blocks you might want to set this back to "Mac App Store and Identified Developers".


  1. Download Code::Blocks. Uncompress the zip file and place CodeBlocks.app where you like it.
    The suggested location is /Developer/Applications or ~/Applications.



Installation for Fedora Linux:

Installing Code::Blocks
In a console window, become root and then execute the following command:
            yum install codeblocks


Running Code::Blocks
In the Applications Pull Down Menu, go to Programming and click on: Code::Blocks IDE
or
Open a console window and then execute the following command:
            codeblocks

Installation for Ubuntu Linux:

1) Add the repositories to /etc/apt/sources.list:

Open the file with a graphical editor as root. Paste the following line in a terminal:
sudo gedit /etc/apt/sources.list

Paste this at the end:
deb http://apt.wxwidgets.org/ lenny-wx main

2) To make sure your package system trusts these sources. Add their keys.

Enter these two lines at the terminal:
wget -q http://apt.wxwidgets.org/key.asc -O-  | sudo apt-key add -
And update the packages by entering the following lines on the terminal:
sudo apt-get update
sudo apt-get upgrade

3) Install Code::Blocks

Enter the following line in the terminal:
sudo apt-get install libcodeblocks0 codeblocks libwxsmithlib0 codeblocks-contrib

You are able to step 3 whenever you want you to get the latest nightly build.

You should see Code::Blocks in the Programming Languages listing of your programs.
Enjoy!

Other info on Code::Block and Ubuntu


If you are you computer savy and would like to update Code::Blocks
to a Nightly Build (nightly updates). You may download them from here.
Vista Note:
There is a beta version of 7Zip that supposedly works with Vista. Please select 32 bit or 64 bit version of Windows.
A work around for 7Zip is to extract the files to a temporary directory in the documents folder and then copy them over to the program files/codeblocks directory.
Source Codes:
If you are interested in the source codes, you can download them from here:
Code Blocks - MinGW Core - G++

Lawrence Goetz
Prof. Yedidyah Langsam
Prof. Theodore Raphan