History: Prerequisites
Preview of version: 104
Introduction
This is a small check list of things you need to do before you're ready to build Ogre from source.
Table of contents
|
|
| 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/.
-
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.
-
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.
This line builds Boost date_time and thread using VC10:
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)
-
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.
- Build the full FreeImage packet on Debug|Win32
- Build the full FreeImage packet on Debug|x64
- Switch actual configuration to Release|Win32
- Save the project map and close VS
- Delete all temporary folders of the project
- Start VS and load FreeImage project
- Build the full FreeImage packet on Release|Win32
- Build the full FreeImage packet on Release|x64
-(Linux)-
|
Before you begin
Ogre does not play well with "Software Rasterizers", so if you run glxinfo | grep Software and it finds "OpenGL renderer string: Software Rasterizer", you may need to investigate upgrading your graphics card or its drivers. See jockey-gtk on Ubuntu for driver help.The easiest way to get Ogre is to install via package manager, e.g. sudo apt-get install libogre-dev However, this may be out of date, e.g. for Ubuntu 10.04 only Ogre 1.6.4 is available, although the latest release is 1.7.1. If you want the latest version of Ogre, follow the directions below and then the CMake Quick Start Guide
|
-(Mac OS X & iOS)-
|
Installing Dependencies
Option 1: Extract the dependencies into your ogre source root. Precompiled archive containing PPC and i386 binaries compiled against the 10.4u SDK are available: OS X Dependencies. A larger selection of precompiled dependency packages including more recent updates and iOS packages can be browsed to from the ogre-dependencies-mac page.Option 2: Install Ogre dependencies system-wide via MacPorts. Be forewarned if you intend to distribute binaries, you may have to jump through a few hoops to link against the static archives (.a) or extract the dynamic libraries and modify their install name (install_name_tool). However individual developers may find this easier to manage on their local machines for general development. Copy to clipboard
Copy to clipboard
If it is not already present, add: Copy to clipboard
Finally, you need to install Cg and OIS. (Not strictly required by Ogre, but required for Demos, and generally recommended.) |