Learn more about installing the CodeBlocks IDE on Mac and Linux!

Join the DZone community and get the full member experience.

Join For Free
Learn more about installing the CodeBlocks IDE on Mac and Linux!

In this tutorial, we'll learn how to install Codeblocks on Mac and Linux. Let's get started.

You may also like: Top 5 Free Courses to Learn Linux Commands

Install CodeBlocks IDE on Mac OS X

Freeware: Code Blocks is free for everyone to download, use and contribute to code. Cross-Platform: All Windows, Linux, and Mac users can enjoy the coolness of CodeBlocks. A comprehensive Wiki with installation, documentation and plugin usage. Download Code::Blocks for free. A free C, C and Fortran IDE. Code::Blocks is a free, open-source, cross-platform C, C and Fortran IDE built to meet the most demanding needs of its users. It is designed to be very extensible and fully configurable.

Installing Codeblock on a Mac is a single-step process. To install Codeblock on Mac, you need Xcode first because the Mac version relies on the Xcode distribution from Apple for its compiler.

There are different ways to download and install Code::Blocks on your computer: Download the binary release. This is the easy way for installing Code::Blocks. Download the setup file, run it on your computer and Code::Blocks will be installed, ready for you to work with it. Can’t get any easier than that! Download a nightly build. The latest Code blocks v16.01 is not available for Mac OS because, as the team behind the IDE put it, they don’t have developers to make one. So head on to codeblocks.org and download the version that is already available. Code::Blocks is an open-source cross-platform IDE (Integrated Development Environment) for C/C. Designed with flexibility in mind, most of its features are provided by external modules (plugins) making it easily extendable and configurable.

Install Xcode on Mac

Code Blocks For Mac Os

  • For installing Xcode, go to the Appstore and enter ‘Xcode’ in the search bar. Then click on the app.
  • Click on Get and Install App. Next, enter your Apple ID and password to download Xcode.






Code blocks download windows 7
  • After the download is complete, open the application, agree to the license agreement, and finally enter your password to complete the Xcode installation.
  • Installing just Xcode isn’t enough, as we also need the GCC compiler for that. Go to the Apple developers site and log in with your ID.
  • Search for Command-line tools and download the dmg file.
  • Once the download is complete, you’ll get a package file (.pkg). Just double-click it and accept all defaults to complete the installation.

Installing CodeBlocks

  • Go to codeblocks.org. Click Download from the menu. Next, click on download the binary release.
  • Then, go to your operating platform section (e.g. Mac OS X). Click on the link opposite to CodeBlocks-13.12-mac.zip to download the package, or click here to download.
  • Now extract the downloaded file and open a New Finder window. Click on Application and move the extracted CodeBlocks file here (in applications).
  • We need to authorize CodeBlocks to run. Now, go to System Preferences >> Security & Privacy.
  • Now, under the General tab, we need to click on lock pad, shown below, and enter the password to unlock.
  • In “Allow app downloaded from,” click on open anyway, a window appears showing the verification process.
  • Then, a new window will open asking us to run CodeBlocks. Click on Open.
  • The first time it opens, all compilers get detected. You need to click on OK so you can change the compiler.
  • We have successfully installed CodeBlocks on your Mac. Here is a simple program, shown below, to try the compiler.

Install CodeBlocks on Linux/Ubuntu

Installing CodeBlocks on Linux is easier than both Mac and Windows because it is already present in the package repository by default. All you need to do is update or install the stable version.

Code Blocks Download For Mac
  • Open the terminal and type the following commands one by one:
  • After the installation, open Codeblocks. On the first launch, as with Mac and Windows, it will detect compilers present on the system.
  • Select the according to your preference or leave it for default. Then click OK.

That's it!

Further Reading

c,c++ 17,c++ beginner course

Opinions expressed by DZone contributors are their own.

Code Blocks 16.01 Download Mac

Popular on DZone

Please select a setup package depending on your platform:

NOTE: For older OS’es use older releases. There are releases for many OS version and platforms on the Sourceforge.net page.

NOTE: There are also more recent nightly builds available in the forums or (for Ubuntu users) in the Ubuntu PPA repository. Please note that we consider nightly builds to be stable, usually.

NOTE: We have a Changelog for 20.03, that gives you an overview over the enhancements and fixes we have put in the new release.

NOTE: The default builds are 64 bit (starting with release 20.03). We also provide 32bit builds for convenience.

Microsoft Windows

FileDownload from
codeblocks-20.03-setup.exeFossHUB or Sourceforge.net
codeblocks-20.03-setup-nonadmin.exeFossHUB or Sourceforge.net
codeblocks-20.03-nosetup.zipFossHUB or Sourceforge.net
codeblocks-20.03mingw-setup.exeFossHUB or Sourceforge.net
codeblocks-20.03mingw-nosetup.zipFossHUB or Sourceforge.net
codeblocks-20.03-32bit-setup.exeFossHUB or Sourceforge.net
codeblocks-20.03-32bit-setup-nonadmin.exeFossHUB or Sourceforge.net
codeblocks-20.03-32bit-nosetup.zipFossHUB or Sourceforge.net
codeblocks-20.03mingw-32bit-setup.exeFossHUB or Sourceforge.net
codeblocks-20.03mingw-32bit-nosetup.zipFossHUB or Sourceforge.net

NOTE: The codeblocks-20.03-setup.exe file includes Code::Blocks with all plugins. The codeblocks-20.03-setup-nonadmin.exe file is provided for convenience to users that do not have administrator rights on their machine(s).

NOTE: The codeblocks-20.03mingw-setup.exe file includes additionally the GCC/G++/GFortran compiler and GDB debugger from MinGW-W64 project (version 8.1.0, 32/64 bit, SEH).

NOTE: The codeblocks-20.03(mingw)-nosetup.zip files are provided for convenience to users that are allergic against installers. However, it will not allow to select plugins / features to install (it includes everything) and not create any menu shortcuts. For the “installation” you are on your own.

If unsure, please use codeblocks-20.03mingw-setup.exe!

Linux 32 and 64-bit

DistroFileDownload from
codeblocks_20.03_amd64_oldstable.tar.xzFossHUB or Sourceforge.net
codeblocks_20.03_i386_oldstable.tar.xzFossHUB or Sourceforge.net
codeblocks_20.03_amd64_stable.tar.xzFossHUB or Sourceforge.net
codeblocks_20.03_i386_stable.tar.xzFossHUB or Sourceforge.net
codeblocks-20.03-1.el6.rmps.tarFossHUB or Sourceforge.net
codeblocks-20.03-1.el7.rmps.tarFossHUB or Sourceforge.net
For Ubuntu, use this PPA

Note: The Linux packages above are compressed archives (tar, tar.xz or tar.bz2). When you decompress the package you downloaded on your system, you will find all the .rpm or .deb packages required to install Code::Blocks.

Code Blocks 10.05 Free Download For Mac

Note: On RedHat/CentOS older revisions of 6 (up to 6.2 as far as we know) you need to add repoforge (former rpmforge) to your repolist, to be able to install the needed wxGTK-package. See http://repoforge.org/use for an instruction.

Note: Redhat/CentOS probably also needs an installed hunspell-package, if you want to install the contrib-plugins.

Mac OS X

FileDownload from
CodeBlocks-13.12-mac.zipFossHUB or Sourceforge.net

NOTES:

  • Code::Blocks 20.03 for Mac is currently not available due to issues caused by Apple hardening their install packages and lack of Mac developers. We could use an extra Mac developer to work on these issues.
  • The provided download contains an Application Bundle (for the i386 architecture) built for Mac OS X 10.6 (and later), bundling most Code::Blocks plugins.

Code Blocks C++ Download For Mac

See also