Skip to main content

History: Prerequisites

Preview of version: 106

prerequisites.jpg

What you need to build Ogre from source.

Introduction

This is a small check list of things you need to do before you're ready to build Ogre from source.

Image

Done Compiler Specific Prerequisites

Done Visual Studio

You need the latest service packs for your version of Visual Studio:
Visual Studio 2008 (VC9) Service pack 1 and the ATL security fix (available from Microsoft Update).
Visual Studio 2005 (VC8) Service pack 1


Visual Studio Express users do not need a separate service pack or ATL security fix because the latest install download is already fixed.
Get it from http://www.microsoft.com/express/Downloads/.


-

Done MinGW


Get the latest MinGW installer from here and install MinGW.
Make sure to include the C++ compiler (it is the only required compiler for Ogre, but installing all of them doesn't hurt).
You most likely do not want the full "MinGW Developer Toolkit", but you should check the "MSYS Basic System".

Install it to C:\mingw.

Also add C:\mingw\bin to your PATH. The installer might ask if it should do that for you, but if you did not install with admin rights, this likely did not work. In any case, you should check and make sure it is correctly added to your PATH.

-

Done Boost

Boost is not required to build Ogre - it's optional. 😊
The Boost Threads library is used by the paging component, which in turn is used by the terrain component, enabling background loading and thus faster response times.
It's recommended to get Boost 1.49.0.
Boost versions from version 1.50 onwards currently (July 2012) require this patch applied to the Ogre sources to function properly. Also, around the same version, bjam was renamed to b2, so don't be confused if newer boost manuals require you to use "b2" instead of "bjam". It's actually the same.

Lucky users of Visual Studio 2003 - 2010 can use the Boostpro Boost Installers.
Select your compiler and "Multithreaded" and "Multithreaded Debug".
Be sure to install Boost Date Time and Boost Thread. The default selection (all) makes sure it's installed.

CMake depends on the following environment variables to find Boost succesfully:
BOOST_ROOT (C:\Program Files\boost\boost_1_49)
BOOST_INCLUDEDIR (C:\Program Files\boost\boost_1_49)
BOOST_LIBRARYDIR (C:\Program Files\boost\boost_1_49\lib)
Well, at least BOOST_ROOT, but it can't hurt to set the two others.

Building boost from source
As boostpro is not always up-to-date with the newest boost versions, you might want to build boost from sources yourself.
MinGW users will always have to build boost from sources.

Get Boost 1.49.0 from www.boost.org and the b2 executable as detailed on the Boost compile page.
Info For MinGW users: When asked to run "bootstrap.bat", make sure to run "bootstrap.bat gcc" instead.

This line builds Boost date_time and thread using VC10:
Info Use the Visual Studio Command Prompt when issuing the command.
Copy to clipboard
b2 --build-dir="C:\boost-vc10" toolset=msvc-10.0 --build-type=complete --with-date_time --with-thread


This line builds Boost date_time and thread using gcc:
Of course, for this to work, MinGW must be installed and added to your PATH.
Copy to clipboard
b2 --build-dir="C:\boost-gcc" toolset=gcc --build-type=complete --with-date_time --with-thread


When done building, move the contents of boost_dir/stage/lib to boost_dir/lib.
If you are sure you're not going to rebuild Boost, you can safely delete the build directory (i.e. C:\boost-vc10)

-

Done Dependencies

A repository containing a CMake version of dependencies is also available here (needed if you want to build Ogre default branch against MinGW).

Experimental : prebuilt dependencies for Visual Studio 9 (2008), Visual Studio 10, Visual Studio 11 and MingW can be grabbed here.
They are based on the dependency repository and are continuously built (ie each time a change is detected on the repository)

Visual Studio users need to compile the dependencies themselves: Visual Studio Dependencies
MinGW users can grab the precompiled MinGW Dependencies

Unpack the dependencies into either your Ogre source directory, your Ogre build directory or somewhere else.
The directory should be named Dependencies if put into either the source or the build directory.
If you choose to place it elsewhere, you can name it however you like, as long as you're setting an environment variable OGRE_DEPENDENCIES_DIR pointing to its location.

It's recommended to use the last option - OGRE_DEPENDENCIES_DIR - as it makes it easier to manage several different dependencies (vc9, vc10, mingw) on the same computer, against the same Ogre source directory.

Tip_icon.png Be sure to build the dependencies if using Visual Studio! Find the solution file in Dependencies/src. And don't forget to build in both configurations: debug and release.

Tip_icon.png Building FreeImage with Visual Studio is buggy (_ITERATOR_DEBUG_LEVEL bug). You can compile FreeImage in the following way:
  1. Build the full FreeImage packet on Debug|Win32
  2. Build the full FreeImage packet on Debug|x64
  3. Switch actual configuration to Release|Win32
  4. Save the project map and close VS
  5. Delete all temporary folders of the project
  6. Start VS and load FreeImage project
  7. Build the full FreeImage packet on Release|Win32
  8. Build the full FreeImage packet on Release|x64

History

Information Version
Thu 15 of Oct, 2015 18:20 GMT-0000 Sauermann Added note about DirectX 9 SDK 125
Sat 14 of Feb, 2015 07:17 GMT-0000 gtsiam123 Added a warning about the install path 124
Thu 05 of Feb, 2015 11:39 GMT-0000 raffamaiden 123
Mon 06 of Oct, 2014 07:36 GMT-0000 spacegaier 122
Fri 04 of Jul, 2014 02:50 GMT-0000 excaliburHisSheath Updates the out-of-date warning for the Ubuntu apt repository to be accurate for Ubuntu 14.4 121
Thu 17 of Apr, 2014 02:58 GMT-0000 excaliburHisSheath Adds a note about installing DirectX on windows 120
Mon 23 of Dec, 2013 15:24 GMT-0000 jakesee 119
Wed 22 of May, 2013 16:55 GMT-0000 spacegaier 118
Tue 22 of Jan, 2013 08:31 GMT-0000 Transporter Update _ITERATOR_DEBUG_LEVEL bug note: The original instructions have been written for the original source and not CMake 117
Mon 23 of Jul, 2012 16:54 GMT-0000 TheSHEEEP 116
Sun 22 of Jul, 2012 12:55 GMT-0000 TheSHEEEP 115
Sun 22 of Jul, 2012 12:49 GMT-0000 TheSHEEEP 114
Sun 22 of Jul, 2012 12:04 GMT-0000 TheSHEEEP 113
Sun 22 of Jul, 2012 10:57 GMT-0000 TheSHEEEP Added likely "outdated" information 112
Sun 22 of Jul, 2012 10:53 GMT-0000 TheSHEEEP 111
Sun 22 of Jul, 2012 10:35 GMT-0000 TheSHEEEP Inserted link to CMake guide. 110
Sun 22 of Jul, 2012 10:15 GMT-0000 TheSHEEEP 109
Sun 22 of Jul, 2012 10:08 GMT-0000 TheSHEEEP More info 108
Sun 22 of Jul, 2012 10:06 GMT-0000 TheSHEEEP 107
Sun 22 of Jul, 2012 10:05 GMT-0000 TheSHEEEP Added note for building boost with MinGW 106
Sun 22 of Jul, 2012 10:01 GMT-0000 TheSHEEEP 105
Sun 22 of Jul, 2012 10:00 GMT-0000 TheSHEEEP bjam --> b2 104
Sun 22 of Jul, 2012 09:57 GMT-0000 TheSHEEEP Boost manual restructured. 103
Sun 22 of Jul, 2012 09:56 GMT-0000 TheSHEEEP 102
Sun 22 of Jul, 2012 09:55 GMT-0000 TheSHEEEP 101