Prerequisites        
Print

Image

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/(external link).


Done MinGW

Tip_icon.png Latest Ogre SDK: Use MinGW from MinGW, not from TDM!

Tip_icon.png A bug in recent versions of CMake prevents Ogre from building on MinGW. Use an earlier version of CMake (version 2.8.3 is the latest working rev)

Earlier Ogre SDKs:
''You need to grab the latest MinGW GCC from Twilight Dragon Media:
http://www.tdragon.net/recentgcc/(external link)
At this time of writing, it's tdm-mingw-1.908.0-4.4.1-2, based on GCC 4.4.1.
The official MinGW won't do. It must be based on GCC 4.4.x.''

Install it to C:\mingw and add C:\mingw\bin to your PATH.


Done DirectX SDK

You need to install the DirectX SDK if you intend to build and use the Direct3D render systems and/or OIS (for the samples).
The DirectX SDK - February 2010(external link) would be an excellent choice, as both Visual Studio and MinGW builds successfully against it.

When installed, it should have registered an environment variable called DXSDK_DIR.
You can check this by running set DXSDK_DIR in a command prompt:
C:\>set DXSDK_DIR
DXSDK_DIR=C:\Program Files\Microsoft DirectX SDK (February 2010)\

If the environment variable DXSDK_DIR isn't present or set, you need to set it as CMake depends on it for finding DirectX.


Done Boost

Boost is not required to build Ogre - it's optional. smile
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.44.0.
Lucky users of Visual Studio 2003 - 2010 can use the Boostpro Boost Installers(external link).
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.
MinGW users need to build Boost from source.
Get Boost 1.44.0 from www.boost.org(external link) and the bjam executable as detailed on the Boost compile page(external link).
This line builds Boost date_time and thread using VC10:
bjam --build-dir="C:\boost-vc10" toolset=msvc-10.0 --build-type=complete --with-date_time --with-thread

Info Use the Visual Studio Command Prompt when issuing the command.

MinGW users can use the 'gcc' buildset, after making sure that MinGW make is in the path (C:\mingw\bin).

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)

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


Done Dependencies

Visual Studio users need to compile the dependencies themselves: Visual Studio Dependencies(external link)
MinGW users can grab the precompiled MinGW Dependencies(external link)
A repository containing a CMake version of dependencies is also available here(external link) (needed if you want to build Ogre default branch against MinGW).

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.

Contributors to this page: mikachu1 points  , vapor46 points  , spacegaier3733 points  , raffamaiden101 points  , ogre_user43 points  , jacmoe111451 points  and ejtttje216 points  .
Page last modified on Tuesday 30 of August, 2011 09:31:38 GMT by mikachu1 points .


The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.