Difference between revisions of "Compiling using Code::Blocks"

From OdaWiki
(Step 2: Getting MinGW)
(Modified framework to allow easier inclusion of Linux instructions in the future)
Line 5: Line 5:
 
This tutorial will show you how to build ODAMEX using the Code::Blocks IDE.
 
This tutorial will show you how to build ODAMEX using the Code::Blocks IDE.
  
==Step 1: Getting Code::Blocks==
+
==Windows==
 +
 
 +
===Step 1: Getting Code::Blocks===
  
 
You can download Code::Blocks from its website here: [http://www.codeblocks.org/ Code::Blocks].  Be sure to get the '''latest nightly build'', and not Release Canadate 2 as this is the one that works with the current project files.
 
You can download Code::Blocks from its website here: [http://www.codeblocks.org/ Code::Blocks].  Be sure to get the '''latest nightly build'', and not Release Canadate 2 as this is the one that works with the current project files.
  
==Step 2: Getting MinGW==
+
===Step 2: Getting MinGW===
  
 
This step is only required if you are using the Code::Blocks nightly builds.  Once an official Code::Blocks package is released (rc3 or 1.0), MinGW will be included with Code::Blocks and you can skip this step.
 
This step is only required if you are using the Code::Blocks nightly builds.  Once an official Code::Blocks package is released (rc3 or 1.0), MinGW will be included with Code::Blocks and you can skip this step.
Line 22: Line 24:
 
Downlaod all of them and extract them to C:\cygwin.  If you're using windows and don't have an archiver capable of handling tar.gz files, stop living in the stone age and download [http://www.7-zip.org/ 7-zip].  If you are compiling Odamex for the purpose of debugging, grab gdb as well.
 
Downlaod all of them and extract them to C:\cygwin.  If you're using windows and don't have an archiver capable of handling tar.gz files, stop living in the stone age and download [http://www.7-zip.org/ 7-zip].  If you are compiling Odamex for the purpose of debugging, grab gdb as well.
  
==Step 3: Required Libraries ==
+
===Step 3: Required Libraries ===
  
 
For ODAMEX to successfully compile, you must obtain some libraries for it, which are:
 
For ODAMEX to successfully compile, you must obtain some libraries for it, which are:
  
=== SDL Development Libraries ===
+
<b>SDL Development Libraries</b>
 +
 
 
You can get the latest version of SDL [http://www.libsdl.org/download-1.2.php  here]
 
You can get the latest version of SDL [http://www.libsdl.org/download-1.2.php  here]
  
 
Unzip the appropriate archive (SDL-devel-1.2.11-mingw32.tar.gz as the time of this writing) onto the desktop (don't worry, it comes in its own tidy little folder).  Copy the bin, include and lib folders from the archive and paste them into your C:\MinGW directory.
 
Unzip the appropriate archive (SDL-devel-1.2.11-mingw32.tar.gz as the time of this writing) onto the desktop (don't worry, it comes in its own tidy little folder).  Copy the bin, include and lib folders from the archive and paste them into your C:\MinGW directory.
  
=== SDL_mixer Development Libraries ===
+
<b>SDL_mixer Development Libraries</b>
  
 
You can get the latest version of SDL_mixer [http://www.libsdl.org/projects/SDL_mixer/ here]
 
You can get the latest version of SDL_mixer [http://www.libsdl.org/projects/SDL_mixer/ here]
Line 37: Line 40:
 
Unzip the appropriate archive (SDL_mixer-devel-1.2.7-VC6.zip as the time of this writing) onto the desktop (don't worry, it comes in its own tidy little folder).  Copy the include and lib folders from the archive and paste them into your C:\MinGW directory.
 
Unzip the appropriate archive (SDL_mixer-devel-1.2.7-VC6.zip as the time of this writing) onto the desktop (don't worry, it comes in its own tidy little folder).  Copy the include and lib folders from the archive and paste them into your C:\MinGW directory.
  
==Step 4: Getting the source code for ODAMEX==
+
===Step 4: Getting the source code for ODAMEX===
  
 
The source code can be obtained through the [http://odamex.net website] or from the [[SVN]] repository  
 
The source code can be obtained through the [http://odamex.net website] or from the [[SVN]] repository  
 
using  an svn client.  For Windows, we recommend [http://tortoisesvn.tigris.org/ tortoisesvn].  For linux and other platforms, you can use the standard [http://subversion.tigris.org/ svn tools].
 
using  an svn client.  For Windows, we recommend [http://tortoisesvn.tigris.org/ tortoisesvn].  For linux and other platforms, you can use the standard [http://subversion.tigris.org/ svn tools].
  
==Step 5: Compiling the ODAMEX source code==
+
===Step 5: Compiling the ODAMEX source code===
  
 
After you've extracted the source code to a directory, open the workspace file (currently named odamex.workspace)
 
After you've extracted the source code to a directory, open the workspace file (currently named odamex.workspace)
 
and go to the '''Build menu''' and click '''Rebuild workspace'''
 
and go to the '''Build menu''' and click '''Rebuild workspace'''
  
==Conclusion==
+
===Conclusion===
  
 
Once its all built (and no errors have occurred), you should find some binary files located in the '''bin''' directory
 
Once its all built (and no errors have occurred), you should find some binary files located in the '''bin''' directory
 
and these are ready to use.
 
and these are ready to use.
 +
 +
==Linux==
 +
Unfortuniatly, we do not support building Odamex in Code::Blocks under Linux at this time.  This is due to the fact that Odamex's project files were created with nightly builds of Code::Blocks, which are incompatable with the latest version avalable for Linux (Release Canadate 2).  Please see [[Compiling using a Makefile]] for more information on how to compile Odamex under Linux.
  
 
==External Links==
 
==External Links==

Revision as of 18:32, 5 November 2006

Overview:


The ODAMEX Source package comes with a variety of project and workspace files.

This tutorial will show you how to build ODAMEX using the Code::Blocks IDE.

Windows

Step 1: Getting Code::Blocks

You can download Code::Blocks from its website here: Code::Blocks. Be sure to get the 'latest nightly build, and not Release Canadate 2 as this is the one that works with the current project files.

Step 2: Getting MinGW

This step is only required if you are using the Code::Blocks nightly builds. Once an official Code::Blocks package is released (rc3 or 1.0), MinGW will be included with Code::Blocks and you can skip this step.

You need the latest version of MinGW from this website. You need the latest stable versions of the following packages...

  • mingw-runtime
  • w32api
  • binutils
  • gcc
  • g++

Downlaod all of them and extract them to C:\cygwin. If you're using windows and don't have an archiver capable of handling tar.gz files, stop living in the stone age and download 7-zip. If you are compiling Odamex for the purpose of debugging, grab gdb as well.

Step 3: Required Libraries

For ODAMEX to successfully compile, you must obtain some libraries for it, which are:

SDL Development Libraries

You can get the latest version of SDL here

Unzip the appropriate archive (SDL-devel-1.2.11-mingw32.tar.gz as the time of this writing) onto the desktop (don't worry, it comes in its own tidy little folder). Copy the bin, include and lib folders from the archive and paste them into your C:\MinGW directory.

SDL_mixer Development Libraries

You can get the latest version of SDL_mixer here

Unzip the appropriate archive (SDL_mixer-devel-1.2.7-VC6.zip as the time of this writing) onto the desktop (don't worry, it comes in its own tidy little folder). Copy the include and lib folders from the archive and paste them into your C:\MinGW directory.

Step 4: Getting the source code for ODAMEX

The source code can be obtained through the website or from the SVN repository using an svn client. For Windows, we recommend tortoisesvn. For linux and other platforms, you can use the standard svn tools.

Step 5: Compiling the ODAMEX source code

After you've extracted the source code to a directory, open the workspace file (currently named odamex.workspace) and go to the Build menu and click Rebuild workspace

Conclusion

Once its all built (and no errors have occurred), you should find some binary files located in the bin directory and these are ready to use.

Linux

Unfortuniatly, we do not support building Odamex in Code::Blocks under Linux at this time. This is due to the fact that Odamex's project files were created with nightly builds of Code::Blocks, which are incompatable with the latest version avalable for Linux (Release Canadate 2). Please see Compiling using a Makefile for more information on how to compile Odamex under Linux.

External Links