Skip to main content

History: Building Ogre3D 1.9 Statically in Mac OS X (Yosemite)

Source of version: 18

Copy to clipboard
            The idea of this tutorial is to help you build Ogre3D 1.9 statically in Mac OS X (Yosemite). Additionally this tutorial will explain you how to run your first application from scratch using CMake and the QtCreator IDE. 

{maketoc}

! Prerequisites
*You need to have a basic C++ background.
*Basic knowledge about how to use a terminal in Mac OS X (create folders, list directory contents, run commands, etc.).
*An Internet connection (this sounds obvious, but it’s better to clarify :) ).
*Have the following software installed (there are no specific restrictions regarding the versions used, but it's better to use the latest):
**Xcode.
**Mercurial.
**QtCreator.
**CMake.   
*When this tutorial refers to the __terminal__, it's refering to the __Mac OS X Terminal__.
*When entering a command in the terminal, this tutorial refers to the current path location with the following notation:  
{CODE(ln=0, wrap="1", colors="c++")}
$> cd /folder1/folder2
/folder1/folder2 $> pwd
/folder1/folder2
{CODE}
---
! Building Ogre
First, create a folder where the whole Ogre3D project will live:
{CODE(wrap="1", colors="c++")}
$> sudo mkdir -p /opt/dev
{CODE}
You can create this folder in another location if you wish. This is not a blocker. The important thing is that you keep in mind where the folder was created to use it from now on.

!! Downloading Ogre3D’s Dependencies
Create the folder where the dependencies will reside:

{CODE(wrap="1", colors="c++")}/opt/dev/ $> mkdir dependencies{CODE}
Go to the following link and download ogre3D’s dependencies:

http://sourceforge.net/projects/ogre/files/ogre-dependencies-mac/1.9/OgreDependencies_OSX_libc%2B%2B_20130610.zip/download

Unzip the file you downloaded. This will contain a folder called __Dependencies__. Copy the content of that folder to the following location:

{CODE(wrap="1", colors="c++")}/opt/dev/dependencies{CODE}
You should have something like this:
{IMG(fileId="2214",rel="box[g]")}{IMG}
These dependencies include:

*Boost: It’s a set of open source libraries that extend the functionality of C++.
*Freeimage: it’s an Open Source library project for developers who would like to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by today's multimedia applications.
*Freetype: It’s is a freely available software library to render fonts.
*OIS: It’s a code library for constructing a human-computer interface with input devices such as a keyboard, mouse or game controller.
*zlib: It’s a software library used for data compression.
*__zziplib:__ it offers the ability to easily extract data from files archived in a single zip file. 

The previous downloaded dependencies are static libraries (end up with the extension .a). Normally in other platforms when you build a library for 32 and 64 bits you end up with two different library files (one for 32 and other for 64). Here in Mac OS X, you can build for 32 AND 64 bits and you end up with a single file. That single file is what is called a “flat” binary or a “universal” binary. In order to check if a library is for 32 or 64 or both, just run the following command in a terminal:

        

History

Information Version
Tue 03 of Feb, 2015 02:31 GMT-0000 Netheril 110
Tue 03 of Feb, 2015 02:28 GMT-0000 Netheril 109
Tue 03 of Feb, 2015 02:28 GMT-0000 Netheril 108
Sun 14 of Dec, 2014 00:04 GMT-0000 Netheril 107
Fri 12 of Dec, 2014 03:14 GMT-0000 Netheril 106
Fri 12 of Dec, 2014 02:50 GMT-0000 Netheril 105
Fri 12 of Dec, 2014 02:50 GMT-0000 Netheril 104
Fri 12 of Dec, 2014 02:49 GMT-0000 Netheril 103
Fri 12 of Dec, 2014 02:49 GMT-0000 Netheril 102
Fri 12 of Dec, 2014 02:37 GMT-0000 Netheril 101
Fri 12 of Dec, 2014 02:24 GMT-0000 Netheril 100
Fri 12 of Dec, 2014 02:04 GMT-0000 Netheril 99
Fri 12 of Dec, 2014 01:37 GMT-0000 Netheril 98
Fri 12 of Dec, 2014 01:21 GMT-0000 Netheril 97
Fri 12 of Dec, 2014 01:17 GMT-0000 Netheril 96
Fri 12 of Dec, 2014 01:17 GMT-0000 Netheril 95
Fri 12 of Dec, 2014 01:17 GMT-0000 Netheril 94
Fri 12 of Dec, 2014 01:15 GMT-0000 Netheril 93
Fri 12 of Dec, 2014 01:07 GMT-0000 Netheril 92
Fri 12 of Dec, 2014 01:06 GMT-0000 Netheril 91
Fri 12 of Dec, 2014 01:03 GMT-0000 Netheril 90
Fri 12 of Dec, 2014 01:00 GMT-0000 Netheril 89
Fri 12 of Dec, 2014 00:59 GMT-0000 Netheril 88
Fri 12 of Dec, 2014 00:52 GMT-0000 Netheril 87
Fri 12 of Dec, 2014 00:47 GMT-0000 Netheril 86