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 the following versions 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 already contains that fix.
Get it from http://www.microsoft.com/express/Downloads/(external link).

Done MinGW


Get the latest MinGW installer from here(external link) 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. 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 at least Boost version 1.49.0 or newer.
Also, around the same boost version, bjam was renamed to b2, so don't be confused if newer boost manuals require you to use "b2" instead of "bjam" when building. It's actually the same.

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.

CMake depends on the following environment variables to find Boost successfully:
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 sometimes might want to build boost from sources yourself.
MinGW users will always have to build boost from sources.

Get Boost from www.boost.org(external link) and the b2 executable as detailed on the Boost compile page(external link) and follow the chapter 5.2 as a guide on how to build boost from source.
Info For MinGW users: When asked to run "bootstrap.bat", make sure to run "bootstrap.bat gcc" instead.

As an example, this line builds Boost date_time and thread using VC10:
Info Use the Visual Studio Command Prompt when issuing the command.
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:
b2 --build-dir="C:\boost-gcc" toolset=gcc --build-type=complete --with-date_time --with-thread


If you just want all of boost installed, just do the same command without "-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 DirectX


To build Ogreon Windows you'll need the DirectX SDK. As of the release of Windows 8, DirectX is no longer a standalone package, rather it is bundled in the Windows8.x SDK (latest version is the Windows 8.1 SDK(external link).)

Done Dependencies

A repository containing a all sources of the Ogre dependencies (along with the necessary CMake scripts) is available here at Bitbucket(external link). Make sure to read our CMake Guide(external link) if you haven't yet.

Tip_icon.png The following two links are outdated and only relevant for Ogre 1.7. It is probably the best to simply build the dependencies using the repository and CMake as described above. But you may of course try to use them:
Visual Studio users need to compile the dependencies themselves: Visual Studio Dependencies(external link)
MinGW users can grab the precompiled MinGW Dependencies(external link)

Unpack the dependencies into either your Ogre source directory, your Ogre build directory or somewhere else.
The directory should be named Dependencies if put either into the source or the build directory (this ensures that the Ogre CMake scripts should automatically find and user it).
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, etc.) on the same computer, against the same Ogre source directory.

Info Additional information for OIS linking error with dxguid.lib can be found in the forums(external link).

Info Building FreeImage with Visual Studio once was buggy (_ITERATOR_DEBUG_LEVEL bug). If you experience any issues, you can compile FreeImage in the following way:
  1. Build the full FreeImage packet on Debug for all platforms
  2. Switch actual configuration to Release
  3. Save the project map and close VS
  4. Delete all temporary folders of the project (look for "Intermediate Directory")
  5. Start VS and load FreeImage project
  6. Build the full FreeImage packet on Release for all platforms


Contributors to this page: spacegaier6073 points  , vapor46 points  , Transporter481 points  , TheSHEEEP801 points  , sharms291 points  , raffamaiden101 points  , ogre_user43 points  , mikachu280 points  , masterfalcon435 points  , jakesee66 points  , jacmoe180265 points  , excaliburHisSheath531 points  , ethankaminski288 points  , entith161 points  and ejtttje216 points  .
Page last modified on Monday 06 of October, 2014 07:36:33 UTC by spacegaier6073 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.