Print
Image

Introduction

Getting the Ogre 1.7 Tutorials to compile and run on OSX 10.6 using XCode 3 can be difficult. This topic covers the complete list of steps used to get your own project (or the Tutorials) up and running quickly.

Install Ogre SDK prebuilt version with prebuilt dependencies

  1. Download and install Ogre SDK prebuilt binary from http://www.ogre3d.org/download/source.(external link) You can install the SDK anywhere on your computer.
  2. Download and install Ogre prebuilt dependencies from http://sourceforge.net/projects/ogre/files/ogre-dependencies-mac/1.7/.(external link)
    1. After extracting the dependencies, move the entire Dependencies folder from the archive into the root of the Ogre SDK.
  3. Download and install the NVIDIA CG framework from http://developer.nvidia.com/cg-toolkit-download.(external link) Follow the direction from NVIDIA to get everything installed correctly. Once it is installed you should be able to find Cg.framework in /Library/Frameworks.
  4. Download and install the XCode 3 templates from http://sourceforge.net/projects/ogre/files/ogre-dependencies-mac/1.7/(external link)
    1. During the install, you can choose to skip the iOS SDK location if you want.
  5. Open XCode and create a new project using the Ogre OS X template.
  6. Close XCode and manually modify the XCode project file to replace references to _OGRESDK_ROOT_ with the path to your install of the Ogre SDK
    1. Navigate to the project you created.
    2. Right click > Show package contents of the .xcodeproj package.
    3. Find and replace all _OGRESDK_ROOT_ references in the project.pbxproj file with the full path to the root of your Ogre SDK
  7. Open the XCode project and fix broken dependencies:
    1. Cg.framework can be found at /Library/Frameworks/Cg.framework.
    2. If there are other libraries that cannot be found this may be an indication that your find and replace from the previous step did not resolve to the correct location. Check the location at which XCode expects the dependencies to resolve to and see if it uses the correct path to the Dependencies folder within your Ogre SDK.
  8. Update XCode project properties to use a newer OSX framework
    1. Open the project properties for your project (right click on the project name in the folder navigator and click Get Info)
    2. Under the Build tab, set the Base SDK to Mac OS X 10.5 or 10.6
  9. Build and run the tutorial framework. You should see the Ogre head demonstration.

If you run into build errors you might need to try installing the dependencies to your system rather than using the pre-built dependencies. Here are the steps to do this...

Install Ogre dependencies to your system

  1. Install Dependencies via macports (option 2 at http://www.ogre3d.org/tikiwiki/Prerequisites?tikiversion=Mac+OS+X+%26+iOS)(external link)
  2. Download and install the NVIDIA CG framework from http://developer.nvidia.com/cg-toolkit-download.(external link) If you already completed this using the previous directions, there's no need to do it again.
  3. Download and install OIS from http://sourceforge.net/projects/wgois/files/Source%20Release/1.3/(external link)
    1. Patch OIS with the following 64 bit patch:
      1. Download the "Cocoa and 64 bit support" patch from http://sourceforge.net/tracker/?atid=775955&group_id=149835&func=browse(external link)
      2. Download the source for OIS from http://sourceforge.net/scm/?type=svn&group_id=149835(external link)
      3. In a terminal, cd into the OIS source you checked out and use the Unix patch tool to apply your patch (patch -p0 -i cocoa.diff)
  4. Build and run your XCode template again.

Install Ogre from source

I have yet to get the XCode 3 templates (or the Tutorial Framework) to compile and run with a source checkout of Ogre on OSX 10.6. When I try to use the a source build, I receive an error when running my projects. If you've gotten this working, please update this page with the necessary directions.


Contributors to this page: marcwren56 points  .
Page last modified on Wednesday 07 of September, 2011 19:19:23 UTC by marcwren56 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.