Difference between revisions of "Installing Code::Blocks"

From CodeBlocks
Jump to: navigation, search
(Alternative method for installing a nightly build)
(Add link to installing Arch on Linux)
 
(41 intermediate revisions by 16 users not shown)
Line 1: Line 1:
[[Category:Installation\Build Instructions]]
+
[[Category:Installing Code::Blocks]]
 
__TOC__
 
__TOC__
 +
* [[Compiled packages of Code::Blocks]]
 +
 
== MS Windows ==
 
== MS Windows ==
  
The first step is to download the Code::Blocks setup file from [http://www.codeblocks.org/downloads.shtml here].
+
* [[Installing the latest official version of Code::Blocks on Windows]]
 +
* [[Installing Code::Blocks nightly build on Windows]]
 +
* [[Installing Code::Blocks from source on Windows]]
  
After you download the setup file you selected, launch it to start the setup process. The setup program is a standard installer for Windows. Just press "Next" after reading each screen. You will be given the chance to read the program license, enter the installation directory and select which plugins you want installed.
+
== Linux ==
A help text on installing a compiler will also appear. Read it!
+
  
=== Alternative method for installing a nightly build ===
+
* [[Installing Code::Blocks from source on Linux]] (applies to all distros)
  
 +
=== Ubuntu ===
  
This is for those who don't care about building CodeBlocks from scratch, they just want to configure CodeBlocks so they can start building thier own projects with it. 
+
:* [[Installing Code::Blocks nightly build on Ubuntu]]
  
 +
=== Debian ===
  
'''NOTE''': if you have installed CodeBlocks RC1 (released fall of 2005), please either uninstall it or make sure you use a different directory. DO NOT install beta releases ontop of RC1.  
+
:* [http://apt.jenslody.de/ Installing Code::Blocks nightly build on Debian]
  
'''The general overview:'''
+
=== Fedora ===
  
-1: Download and install MinGW[http://wiki.codeblocks.org/index.php?title=MinGW_installation]
+
:* [[Installing Code::Blocks nightly build on Fedora]]
  
-2: Download gdb 6.3.2 from MinGW website and install it.
+
=== Blag ===
[http://prdownloads.sf.net/mingw/gdb-6.3-2.exe?download]
+
+
-3: Download and install 7-zip  the Zip utility CodeBlocks comes in.[http://www.7-zip.org/]
+
  
-4: Download CodeBlocks nightly build
+
:* [[Installing Code::Blocks nightly build on Blag]]
[http://www.codeblocks.org/nightly/]
+
  
-5: Download the unicode windows wxWidget dll for Code::Blocks
+
=== Gentoo ===
[http://prdownloads.sourceforge.net/wxwindows/wxMSW-2.6.2.zip]
+
  
-6: Download wxWidgets and build it
+
:* [[Installing Code::Blocks from source on Gentoo]]
  
-7: Unzip CodeBlocks and the wxWidget dll for Code::Blocks
+
=== Platypux ===
  
-8: Start CodeBlocks and configure GNU GCC compiler
+
:* [[Installing Code::Blocks with LZM binary on Platypux]]
  
 +
=== Arch Linux ===
  
'''
+
:* [[Installing Code::Blocks from source on Arch Linux]]
Installing CodeBlocks on Windows:'''
+
  
Get and install the required components
+
=== RPM based distributions ===
Code::Blocks officially supports wxWidgets 2.6.
+
  
You'll need a complete, working MinGW installation.  [http://wiki.codeblocks.org/index.php?title=MinGW_installation]
+
Such as: Red Hat Linux, Yellow Dog Linux, Fedora Core, CentOS, etc. etc.
  
You'll also want the GDB debugger found here: [http://prdownloads.sf.net/mingw/gdb-6.3-2.exe?download]
+
:* [[Installing Code::Blocks nightly build on RPM based distributions]]
 +
:* [[Installing Code::Blocks from source on RPM based distributions]]
  
Download and unpack CodeBlocks wherever you wish. [http://www.codeblocks.org/nightly/]  (You'll need the 7zip utility.)
 
  
 +
== BSD ==
  
Download wxWidgets 2.6.2 from [http://prdownloads.sourceforge.net/wxwindows/wxMSW-2.6.2.zip]
+
=== FreeBSD ===
Unzip wxWidgets then:
+
  
After unpacking the zip file to a directory of your choice, open a cmd prompt, and navigate to the folder build/msw inside the wxWidgets folder. Use the following commands to compile wxWidgets*):
+
:* [[Installing Code::Blocks from source on FreeBSD]]
  
 +
=== OpenBSD ===
 +
:* http://openports.se/devel/codeblocks
  
'''Run the following 3 commands:'''
+
== Solaris ==
  
set path=c:\mingw\bin;c:\mingw\mingw32\bin
+
* [[Installing Code::Blocks from source on Solaris]]
  
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1  clean
+
== Mac OS X ==
  
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
+
* [[Installing the latest official version of Code::Blocks on Mac OS X]]
  
 +
* [[Installing Code::Blocks nightly build on Mac OS X]]
  
''*) This assumes your MinGW installation is in C:\mingw. Use a different path if you installed MinGW somewhere else.''
+
* [[Installing Code::Blocks from source on Mac OS X]]
  
Now when you first run CodeBlocks you will be asked about where your wxWidgets installation is.  From this point on, you should be able to create a "Hello World" application, build and run it.  Enjoy.
+
== Derivatives ==
  
== Linux ==
+
* [http://codeblocks.codecutter.org/ Code::Blocks EDU-Portable] - portable installation configured for learners and instructors of C/C++.
  
=== Ubuntu ===
+
* [http://darmar.vgtu.lt/ Code::Blocks IDE for Fortran] - additional features for Fortran oriented programmers.
This is a quick guide to get Code::Blocks up and running on your ubuntu based Linux distribution. It is also going to make sure you can develop wxWidgets applications on your box as well. Look at the bottom of this guide for a complete command line that will install all the packages in one operation.
+
  
1. Get the latest daily build of Code::Blocks from the [http://forums.codeblocks.org/index.php?board=20.0 forum].
+
==Working on Code::Blocks sources from within Code::Blocks!==
  
2. Install Code::Blocks.
+
The following applies for all platforms where you have Code::Blocks installed and working.
sudo dpkg -i <Name_Of_Daily_Build.deb>
+
  
3. Install the compiler.
+
After correct install of Code::Blocks you will find two folders under .../trunc/src , a directory named "devel" and another one named "output".
sudo apt-get install build-essential
+
These two folders will contain the same files and directory structure and you can use the IDE from either of these two directories. This structure has been created so that you can work in Code::Blocks while editing Code::Blocks' sources ;).
 
+
Basically, you'll be using the "output/CodeBlocks.exe" executable. Code::Blocks' project settings are such that all output goes under "devel". So you can edit Code::Blocks' sources inside Code::Blocks and, when pressing "Run", it will run the "devel/CodeBlocks.exe" executable ;). This way, you can't ruin the main executable you're using (under "output"). When your changes satisfy you and all works well, quit Code::Blocks, run "make update" from command line and re-launch "output/CodeBlocks.exe". You'll be working on your brand new IDE!
4. Install the debugger.
+
sudo apt-get install gdb
+
 
+
5. Install wxWidgets library. (This package is all that is needed to run any application that uses wxWidgets. ie. Code::Blocks)
+
sudo apt-get install libwxgtk2.6-0
+
 
+
6. Install the wxWidgets developement packages. (This is used to develop wxWidgets applications of your own.)
+
sudo apt-get install libwxgtk2.6-dev wx2.6-headers wx-common
+
 
+
7. ''(OPTIONAL)'' Install the wxWidgets documentation.
+
sudo apt-get install wx2.6-doc
+
 
+
 
+
----
+
 
+
NOTE: Here is a complete command line for steps 3 - 7. Watch for word wrap.
+
sudo apt-get install build-essential gdb libwxgtk2.6-0 libwxgtk2.6-dev wx2.6-headers wx2.6-doc wx-common
+
 
+
Without optional steps:
+
sudo apt-get install build-essential gdb libwxgtk2.6-0 libwxgtk2.6-dev wx2.6-headers wx-common
+
 
+
== Mac OS X ==
+

Latest revision as of 22:25, 8 August 2019

MS Windows

Linux

Ubuntu

Debian

Fedora

Blag

Gentoo

Platypux

Arch Linux

RPM based distributions

Such as: Red Hat Linux, Yellow Dog Linux, Fedora Core, CentOS, etc. etc.


BSD

FreeBSD

OpenBSD

Solaris

Mac OS X

Derivatives

Working on Code::Blocks sources from within Code::Blocks!

The following applies for all platforms where you have Code::Blocks installed and working.

After correct install of Code::Blocks you will find two folders under .../trunc/src , a directory named "devel" and another one named "output". These two folders will contain the same files and directory structure and you can use the IDE from either of these two directories. This structure has been created so that you can work in Code::Blocks while editing Code::Blocks' sources ;). Basically, you'll be using the "output/CodeBlocks.exe" executable. Code::Blocks' project settings are such that all output goes under "devel". So you can edit Code::Blocks' sources inside Code::Blocks and, when pressing "Run", it will run the "devel/CodeBlocks.exe" executable ;). This way, you can't ruin the main executable you're using (under "output"). When your changes satisfy you and all works well, quit Code::Blocks, run "make update" from command line and re-launch "output/CodeBlocks.exe". You'll be working on your brand new IDE!