The Glest Wiki

Those informations are/may be very outdated, please go to: new wiki

This method of building MegaGlest is no longer officially supported. This page details how to perform cross platform compiling for MegaGlest with CodeBlocks. It is recommended to use VC++ instead of this approach if compiling on Windows. Project files for codeblocks are not always up to date and therefore not fully supported but rather for educational purposes. The cmake build system used by megaglest may produce codeblocks project files that work better than the project files included in these steps.

CodeBlocks Cross Platform IDE / Compiling[]

Check out the source code[]

Pick a subversion client, then get the project from MegaGlests' subversion repository.

Get the dependencies[]


Ensure you have the following library dependencies:

jpeg, lua5.1, png, SDL, openal, curl, xerces-c, ogg, vorbis, vorbisfile, vorbisenc, z, GL, GLU, SDLmain, ircclient

Some of the tools also require wx. On Debian like systems (such as Ubuntu and its derivatives), these packages will typically start with "lib", sometimes have a number added, and end with "-dev". For example, the development package for the xerces-c library may be called libxerces-c2-dev.


Download the Mingw build dependencies archive, then decompress the mingw dependency archive (using 7-zip) into the source folder. You should now see a source\win32_deps sub-folder with lots of stuff inside.

Install CodeBlocks[]

Install CodeBlocks for your platform.

Configure CodeBlocks[]

If you plan to build Windows binaries (Linux Cross Compile or Windows Mingw) configure CodeBlocks for Mingw.

Open the main workspace in CodeBlocks located in: mk/windoze/megaglest.workspace

Make a build[]

Select the build target (the dropdown at the top) from current available options:

  • Release Win32
  • Release Linux
  • Debug Win32
  • Debug Linux.

From the Build Menu option Select Rebuild Workspace.

Inspecting your builds[]

Linux targets[]

Linux targets compile into mk/linux and are called glest.bin, glest_editor, glest_g3dviewer etc.

Windows targets[]

If nothing goes wrong you will see glest_game.exe (and other binaries) in data/glest_game for Windows targets (where all the data content lives).

To test the game, Windows users copy dependency DLL's from the win32_deps\lib folder to the runtime binary folder.