CodeBlocks

From D Wiki
Revision as of 16:43, 13 March 2018 by D user (talk | contribs) (Category:IDEs)
Jump to: navigation, search

Cb splash.png

  1. Release: 10.05 (04 July 2010)
  2. Nightly: r8598 (23 November 2012)

The open source, cross platform Free C++ / D IDE. Now with DMD and GDC compilers. For Windows, GNU/Linux, FreeBSD and Mac OS X.

Features

Highlights

  • Open Source! GPLv3, no hidden costs.
  • Cross-platform. Runs on GNU/Linux, Mac OS X, Windows, FreeBSD (uses wxWidgets).
  • Written in C++. No interpreted languages or proprietary libs needed.
  • Extensible through plugins

Compiler

  • Multiple compiler support:
    • GCC (GNU GCC - GDC, MinGW)
    • Digital Mars (C++, D)
    • ... and much more
  • Very fast custom build system (no makefiles needed)
  • Support for parallel builds (utilizing your CPU's extra cores)
  • Multi-target projects
  • Workspaces to combine multiple projects
  • Inter-project dependencies inside workspace

Debugger

  • Interfaces GNU GDB
  • supports ddbg
  • Also supports MS CDB (not fully featured)
  • Full breakpoints support:
    • Code breakpoints
    • Data breakpoints (read, write and read/write)
    • Breakpoint conditions (break only when an expression is true)
    • Breakpoint ignore counts (break only after certain number of hits)
  • Display local function symbols and arguments
  • User-defined watches (support for watching user-defined types through scripting)
  • Call stack
  • Disassembly
  • Custom memory dump
  • Switch between threads
  • View CPU registers

Interface

  • Syntax highlighting, customizable and extensible
  • Code folding for C++ / D and XML files.
  • Tabbed interface
  • Code completion (works partially, based on the similarity to C++)
  • Class browser
  • Smart indent
  • Open files list for quick switching between files (optional)
  • External customizable "Tools"
  • To-do list managment with different user
  • Extensible through plugins

Install Instructions


  • Nightly Build (frequently updated: 22 May 2010)
    • Get the needed files: link
      • CB nightly
      • mingwm10.dll
      • wxmsw28u_gcc_cb.dll
    • Those are the 3 things we need to install and start up a nigthly build. All 3 of them are available in their own zip file, zipped by using the free and excellent 7-zip (www.7-zip.org). Just get your copy of 7-zip for unzipping.
    • Final steps :
      • unzip the CB nightly in some directory
      • unzip both dll's : requirement : they need to be in your PATH, most easiest is to unzip both of them into the same directory where you unzipped the nightly, so they reside next to the codeblocks.exe .
    • By performing these simple steps you nightly is ready to roll.


  • Build from source
    • Checkout the latest source via SVN
$ svn co svn://svn.berlios.de/codeblocks/trunk codeblocks


Installation instructions / Howto for Debian/Ubuntu/Mint

  • Download and install Debian package for D compiler [[1]] (32bit) or [[2]] (64bit).
  • Then, i.e. after installing dmd2, install the "codeblocks" debian package (No download necessary; it's in the standard repositories, so "sudo apt-get install codeblocks" will do fine).
  • Start code:blocks and go to "Settings"->"Compiler".
    • Click "Compiler Settings" and change the sub-tab to "Other options". Then enter "-m32" in the edit field (or "-m64" if you are running on amd64 (x86_64). If you are unsure, enter "uname -p" in a terminal to find out)
    • Next, click on the "Linker Settings" tab and add "phobos2" into the "link libraries" (Do not change/edit/delete the "m" and "pthread" entries and do not enter libphobos2 or similar as suggested by some online resources but simply "phobos2").
    • Next, click on the "Search directories" tab and then on "Compiler" and add the two entries "/usr/include/dmd/druntime/import" and "/usr/include/dmd/phobos".
    • Next, click the "Linker" sub tab and add or edit "/usr/lib/i386-linux-gnu" (or "/usr/lib/x86_64-linux-gnu" for the 64bit version).
    • Next, click on the "Toolchain executables" tab and enter or change the "Compilers installation directory" to "/usr".
    • Finally, adapt the edit field under "Program files" for "Linker for dynamic libs" to your needs, typically to "gcc -m32 -lrt" (again, replace "-m32" with "-m64" for a 64bit version).

That's it. Now, you can create a D project and it should compile/link fine. ;)

Compiler

  • Digital Mars D Compiler for Windows
http://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler#Digital_Mars_D_Compiler_for_Windows
  • Digital Mars D Compiler for Linux
http://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler#Digital_Mars_D_Compiler_for_Linux

Debugger

Screenshot