Skip to main content

History: Setting Up An Application - Linux

Preview of version: 21

Image
Eclipse | Code::Blocks | QtCreator | Setting Up An Application - NetBeans - Linux|NetBeans))

TOC

Introduction

This set of instructions will walk you through setting up an Eclipse 3.6 C++ Project from scratch. When you have finished this tutorial you will be able to compile a working Ogre Application and you will be ready to start the Basic Tutorials.

{VERSIONS(nav="y",default="Eclipse 3.6")}
Guide for setting up an Ogre application using Eclipse 3.6 with the CDT (C/C++ Development Tools) Plugin.

Prerequisites

  • Eclipse 3.6 must be installed.
  • Eclipse CDT Plugin must be installed.
  • The Ogre SDK version 1.7 or greater must be installed.
    • Installing the Ogre SDK: Installing the Ogre SDK
    • Build Ogre from source with CMake: CMake Quick Start Guide (note that I've only tested this with a manually compiled source version of the Ogre SDK) If you are building Ogre from source, you must build the debug and release targets and execute the Install script for both targets as well. This will create a directory structure that is identical to the binary install structure.

Setting Up an Application for Eclipse 3.6

New Project


Create a new C++ Project (File -> New -> C++ Project)
Make sure that Empty Project is checked, and give your new application a name (i.e. testing)

Tutorial Framework


Download the Ogre Wiki Tutorial Framework here:
No such attachment on this page
Note that the above links to the WINDOWS version of the Ogre Wiki Tutorial Framework compressed archive. As of the time of this writing, the linux version of the framework archive does not open properly. The windows formatted version, however, should work just fine.

Extract Tutorial Framework:

  • Right-click on the TutorialFramework.zip file and select Extract Here


A new folder named TutorialFramework should appear, with 4 files in it.

Import Existing Items to Project:

  • Open up Eclipse and Right-click on your project (i.e. testing)
  • Click Import
  • Expand the General folder, highlight File System, and click Next
  • Click Browse... and navigate to the folder where you extracted the tutorial framework archive (i.e. /home/your name/Downloads/TutorialFramework/), then click OK
  • Click Select All or check all of the tutorial framework files that show up
  • Click Finish

Project Configuration


Project Properties:

  • Right-click on your project and then click Properties


Add Environment Variable:

  • Expand the C/C++ Build section and click on Environment
  • Click Add... to add a new variable
  • Give the new variable the name OGRE_LOC, and enter the location of your Ogre3d source folder as the value (i.e. /home/your name/workspace/ogre_src_v1-7-1)


Add GCC C++ Compiler Include paths and GCC C++ Linker Library names:

  • Again under the C/C++ Build section, click on Settings
  • Click on the Tool Settings tab
  • Under the GCC C++ Compiler section, click on Includes
  • To the right, click on the Add icon
  • Enter ${OGRE_LOC}/OgreMain/include as the Directory and click OK
  • Add the following directories like you did the previous one:
    • ${OGRE_LOC}/include
    • ${OGRE_LOC}/Samples/Common/include
    • /usr/include/OIS (Note: the OIS package may be installed somewhere else for you, so double check that this directory exists. If you can't find it under /usr/include/OIS, check /usr/local/include/OIS (I believe this is the default installation directory))
  • Now, under the GCC C++ Linker section, click on Libraries
  • To the right, click on the Add icon for Libraries (-l)
  • Enter OgreMain as the Library and click OK
  • Add a library directory called OIS in the same way you did OgreMain

resources.cfg and plugins.cfg


Make sure you have the resources.cfg and plugins.cfg files in your project directory.

That's it!


You've set up an Ogre project succesfully.
All that remains is to build and run it. 😊

History

Information Version
Sat 06 of Aug, 2011 19:24 GMT-0000 wolterh 27
Sat 06 of Aug, 2011 19:24 GMT-0000 wolterh Noted that the user should download the Ogre Samples package if the application was not built from source. 26
Sat 01 of Jan, 2011 21:32 GMT-0000 jacmoe 25
Sat 01 of Jan, 2011 16:28 GMT-0000 jacmoe 24
Sat 01 of Jan, 2011 16:17 GMT-0000 jacmoe 23
Sat 01 of Jan, 2011 16:14 GMT-0000 jacmoe 22
Sat 01 of Jan, 2011 16:12 GMT-0000 jacmoe 21
Thu 23 of Dec, 2010 03:27 GMT-0000 cmwslw There is no longer a build directory 20
Thu 04 of Nov, 2010 23:13 GMT-0000 chisser98 19
Thu 04 of Nov, 2010 23:04 GMT-0000 chisser98 18
Thu 04 of Nov, 2010 23:00 GMT-0000 chisser98 17
Thu 04 of Nov, 2010 22:48 GMT-0000 chisser98 16
Thu 04 of Nov, 2010 22:45 GMT-0000 chisser98 15
Thu 04 of Nov, 2010 22:44 GMT-0000 chisser98 14
Thu 04 of Nov, 2010 22:43 GMT-0000 chisser98 13
Tue 25 of May, 2010 02:27 GMT-0000 jacmoe 12
Wed 28 of Apr, 2010 00:58 GMT-0000 jacmoe 11
Mon 04 of Jan, 2010 14:35 GMT-0000 jacmoe 10
Tue 29 of Dec, 2009 08:32 GMT-0000 jacmoe 9
Tue 29 of Dec, 2009 07:45 GMT-0000 jacmoe 8
Sat 26 of Dec, 2009 19:56 GMT-0000 jacmoe 7
Sat 26 of Dec, 2009 19:45 GMT-0000 jacmoe 6
Sat 26 of Dec, 2009 19:44 GMT-0000 jacmoe 5
Sat 26 of Dec, 2009 19:41 GMT-0000 jacmoe 4
Sat 26 of Dec, 2009 19:41 GMT-0000 jacmoe 3
  • «
  • 1 (current)
  • 2