Skip to main content

History: Prerequisites V2

Source of version: 5

Copy to clipboard
            {BOX(width="100%",class="Layout_box9")}{SPLIT(colsize=10%|70%)}{IMG(fileId="1711",imalign="left",link="Prerequisites V2",title="Prerequisites V2")}{IMG}
---
{DIV(class="bigBold")}((Prerequisites V2)){DIV}
What you need to build Ogre from source.
{SPLIT}{BOX}
!!Introduction
This is a small check list of things you need to do before you're ready to ((Building Ogre V2|build Ogre from source)).
{maketoc}
{VERSIONS(nav="y",title="y",default="Microsoft Windows")}
{SPLIT(colsize=10%|70%)}{IMG(src="img/wiki_up/Big_Logo_Windows.jpg",height="66",width="66",imalign="left")}{IMG}
---
~tc~clear~/tc~
!!%done%Install paths
Make sure that Cmake and the project are both installed in a folder with no spaces and latin characters only.

!! %done% Compiler Specific Prerequisites
!!! %done% Visual Studio
Best thing is to start with the latest version of Visual Studio.
Download Download 'Visual Studio Community Free' from [https://www.visualstudio.com/downloads] and run __vs_community_ENU.exe__ (installation takes about half and hour)

!!! %done% MinGW
Get the latest MinGW installer from [http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/|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 {MONO()}C:\mingw{MONO}. 

Also add {MONO()}C:\mingw\bin{MONO} 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% DirectX
If you want to use DirectX in Ogre3D, the 'Windows Software Development Kit (SDK) for Windows 10' is required (if you are using Windows 10 of course).
Download it from [https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk]. Run 'sdksetup.exe' and install the SDK (this will take some time).

Mandatory for compiling SDL2 however, is the use of the DirectX Software Development Kit 'DirectX 9 SDK (DX SDK June 2010)'; this version is not used by
Ogre3D V2.1 (because it doesn't use DirectX 9 anymore), but it is only used for SDL2. SDL2 is used by the tutorial and samples, which are part of the Ogre source. Download DirectX 9 SDK from [https://www.microsoft.com/en-us/download/confirmation.aspx?id=6812]

!! %done% Dependencies
A repository containing a all sources of the Ogre dependencies (along with the necessary CMake scripts) is available [https://bitbucket.org/cabalistic/ogredeps|here at Bitbucket]. Make sure to read our [http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Getting+Started+With+CMake|CMake Guide] if you haven't yet.

%warning2% 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: [https://sourceforge.net/projects/ogre/files/ogre-dependencies-vc%2B%2B/1.7/OgreDependencies_MSVC_20101231.zip/download|Visual Studio Dependencies]	 
__MinGW users__ can grab the precompiled [https://sourceforge.net/projects/ogre/files/ogre-dependencies-mingw/1.7/OgreDependencies_MinGW_20100216.zip/download|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 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 {MONO()}OGRE_DEPENDENCIES_DIR{MONO} pointing to its location.

It's recommended to use the last option - {MONO()}OGRE_DEPENDENCIES_DIR{MONO} - as it makes it easier to manage several different dependencies (VC9, VC10, MinGW, etc.) on the same computer, against the same Ogre source directory.

%note% Additional information for OIS linking error with dxguid.lib can be found in the [http://www.ogre3d.org/forums/viewtopic.php?f=2&t=70302|forums].

%note% 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:
# Build the full FreeImage packet on Debug for all platforms
# Switch actual configuration to Release
# Save the project map and close VS
# Delete all temporary folders of the project (look for "Intermediate Directory")
# Start VS and load FreeImage project
# Build the full FreeImage packet on Release for all platforms

{SPLIT}
---(Linux)---
{SPLIT(colsize=10%|70%)}{IMG(src="img/wiki_up/Big_Logo_Linux.jpg",height="66",width="66",imalign="left")}{IMG}
---
~tc~clear~/tc~
!!Before you begin
Ogre does not play well with "Software Rasterizers", so if you run {MONO()}glxinfo | grep Software{MONO} and it finds "OpenGL renderer string: Software Rasterizer", you may need to investigate upgrading your graphics card or its drivers.  See {MONO()}jockey-gtk{MONO} on Ubuntu for driver help.

The easiest way to get Ogre is to install via package manager, e.g.
{MONO()}sudo apt-get install libogre-1.9-dev{MONO}

{REMARKSBOX(type="note",title="Check Ogre Versions")}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. Ogre 1.9 is available for Ubuntu 14.4.{REMARKSBOX}

If you want the latest version of Ogre, follow the directions below and then the ((CMake Quick Start Guide))

!! %done% Ubuntu
{img src="img/wiki_up/Ubuntu_logo.png" alt="" imalign="right"}
For Ubuntu Karmic and above:

{CODE(caption="Compiler And Configuration Tools",wrap="1",colors="bash")}sudo apt-get install build-essential automake libtool{CODE}

{CODE(caption="Required Dependencies",wrap="1",colors="bash")}sudo apt-get install libfreetype6-dev libfreeimage-dev libzzip-dev libxrandr-dev libxaw7-dev freeglut3-dev libgl1-mesa-dev libglu1-mesa-dev{CODE}
If during Ogre build any headers are still missing, try adding these one at a time, and update the list above please! :)
* libxt-dev
* libpng3-dev
Could probably use {MONO()}libglew1.5-dev{MONO} instead of {MONO()}freeglut3-dev{MONO}. It is an open question whether or not {MONO()}libxt-dev{MONO} and {MONO()}libpng3-dev{MONO} is required.

{CODE(caption="Not Strictly Required Dependencies",wrap="1",colors="bash")}sudo apt-get install nvidia-cg-toolkit libois-dev libboost-thread-dev{CODE}
%note% While {MONO()}nvidia-cg-toolkit{MONO}, {MONO()}libois-dev{MONO} and {MONO()}libboost-thread-dev{MONO} are not strictly required, you'll want to install them:
*{MONO()}nvidia-cg-toolkit{MONO} is used by the Cg plugin for Cg shaders.
*{MONO()}libois-dev{MONO} is used as input library for the demos.
*{MONO()}libboost-thread-dev{MONO} is used by the paging component and other background threading.

{CODE(caption="Entirely Optional Dependencies",wrap="1",colors="bash")}sudo apt-get install doxygen graphviz libcppunit-dev{CODE}

----
!! %done% Fedora
{IMG(src="img/wiki_up/Fedora.jpg",alt="fedora.jpg", imalign="right")}{IMG}
This is a list of packages to install for Fedora 13:

{CODE(caption="Required Dependencies", wrap="1",colors="bash")}gcc-c++ libXaw-devel freetype-devel freeimage-devel zziplib-devel cmake{CODE}

{CODE(caption="Not Strictly Required Dependencies",wrap="1",colors="bash")}boost-devel ois-devel Cg{CODE}
WARNING: To install the Cg package, you need to enable the [http://rpmfusion.org/Configuration|nonfree RPMFusion repositories]

{CODE(caption="Entirely Optional Dependencies", wrap="1",colors="bash")}doxygen cppunit-devel{CODE}

----
!! %done% OpenSUSE
{IMG(src="tiki-download_file.php?fileId=2140&display",imgalign="right")}{IMG}

This is a list of packages to install for OpenSUSE 12.2:

To install these optional dependencies (recommended) you will need to add the OpenSUSE games repo:
{CODE(caption="Add games repo",wrap="1",colors="bash")}zypper ar http://download.opensuse.org/repositories/games/openSUSE_Factory/ games{CODE}

{CODE(caption="Required Dependencies", wrap="1",colors="bash")}zypper in gcc-c++ libXaw-devel freetype2-devel freeimage-devel libxrandr-devel zziplib-devel cmake{CODE}

{CODE(caption="Not Strictly Required Dependencies",wrap="1",colors="bash")}zypper in boost-devel libOIS-devel cg-devel{CODE}

{CODE(caption="Entirely Optional Dependencies", wrap="1",colors="bash")}zypper in doxygen cppunit-devel{CODE}

----
!! %done% Arch Linux

{IMG(fileId="2081",alt="archlinux.png", imalign="right")}{IMG}
Run this to install the Ogre dependencies for Arch Linux:

{CODE(wrap="1",colors="bash")}pacman -S boost-libs boost freeimage freetype2 libxaw libxrandr mesa nvidia-cg-toolkit ois zziplib cmake gcc{CODE}

{SPLIT}
---(Mac OS X & iOS)---
{SPLIT(colsize=10%|70%)}{IMG(src="img/wiki_up/Big_Logo_Macintosh.jpg",height="66",width="66",imalign="left")}{IMG}
---

!!!Installing Dependencies
''Option 1:'' Extract the [http://www.ogre3d.org/forums/viewtopic.php?f=1&t=54533|dependencies] into your Ogre source root. Precompiled archive containing PPC and i386 binaries compiled against the 10.4u SDK are available: [https://sourceforge.net/projects/ogre/files/ogre-dependencies-mac/1.7/OgreDependencies_OSX_20091230.zip/download|OS X Dependencies] (link is only valid for Ogre version 1.7). A larger selection of precompiled dependency packages including more recent updates and iOS packages can be browsed to from the [http://sourceforge.net/projects/ogre/files/ogre-dependencies-mac/|ogre-dependencies-mac] page.

''Option 2:'' Install Ogre dependencies system-wide via [http://www.macports.org/install.php|MacPorts]. Be forewarned if you intend to distribute binaries, you may have to jump through a few hoops to link against the static archives ({MONO()}.a{MONO}) or extract the dynamic libraries and modify their install name ({MONO()}install_name_tool{MONO}).  However individual developers may find this easier to manage on their local machines for general development.
{CODE(wrap="1", colors="sh")}sudo port install libpng +universal jpeg +universal libxml2 +universal
sudo port install pkgconfig xmlto autoconf automake libtool
sudo port install freetype +universal freeimage +universal libzzip +universal boost +universal ois +universal
sudo port install cmake{CODE}
* Ogre3D requires a 32 bit build due to use of Carbon interfaces via OIS.  Thus the +universal specifications to ensure 32 and 64 bit builds for libraries.
* You need the first line even if you already have libpng/jpeg/xml2 installed because they will be re-installed within the package system and we need to ensure universal build.  You may need {MONO()}--enforce-variants{MONO} if you have already installed these packages.
* The second line is the build dependencies of libzzip, they do not need to be universal, but use +no_x11 +quartz to avoid unnecessary additional packages
Finally, from the terminal:
{CODE(wrap="1", colors="bash")}touch ~/.bash_profile
open -a TextEdit ~/.bash_profile{CODE}
If it is not already present, add:
{CODE(wrap="1", colors="bash")}export CPPFLAGS="-I/opt/local/include"
export LDFLAGS="-L/opt/local/lib"{CODE}
Finally, you need to install [http://developer.nvidia.com/object/cg_download.html|Cg] and [http://sourceforge.net/projects/wgois/|OIS]. (Not strictly required by Ogre, but required for Demos, and generally recommended.)

{SPLIT}
{VERSIONS}
        

History

Information Version
Thu 29 of Dec, 2016 22:26 GMT-0000 spookyboo 18
Thu 29 of Dec, 2016 22:25 GMT-0000 spookyboo 17
Thu 29 of Dec, 2016 22:24 GMT-0000 spookyboo 16
Thu 29 of Dec, 2016 20:05 GMT-0000 spookyboo 15
Thu 29 of Dec, 2016 17:05 GMT-0000 spookyboo 14
Thu 29 of Dec, 2016 17:03 GMT-0000 spookyboo 13
Thu 29 of Dec, 2016 17:02 GMT-0000 spookyboo 12
Thu 29 of Dec, 2016 16:55 GMT-0000 spookyboo 11
Thu 29 of Dec, 2016 16:53 GMT-0000 spookyboo 10
Thu 29 of Dec, 2016 16:52 GMT-0000 spookyboo 9
Wed 28 of Dec, 2016 22:20 GMT-0000 spookyboo 8
Wed 28 of Dec, 2016 22:15 GMT-0000 spookyboo 7
Wed 28 of Dec, 2016 22:13 GMT-0000 spookyboo 6
Wed 28 of Dec, 2016 22:08 GMT-0000 spookyboo 5
Wed 28 of Dec, 2016 22:00 GMT-0000 spookyboo 4
Wed 28 of Dec, 2016 21:53 GMT-0000 spookyboo 3
Wed 28 of Dec, 2016 21:52 GMT-0000 spookyboo 2
Wed 28 of Dec, 2016 14:14 GMT-0000 spookyboo 1