OGRE Wiki
Support and community documentation for Ogre3D
Ogre Forums
ogre3d.org
Log in
Username:
Password:
CapsLock is on.
Remember me (for 1 year)
Log in
Home
Tutorials
Tutorials Home
Basic Tutorials
Intermediate Tutorials
Mad Marx Tutorials
In Depth Tutorials
Older Tutorials
External Tutorials
Cookbook
Cookbook Home
CodeBank
Snippets
Experiences
Ogre Articles
Libraries
Libraries Home
Alternative Languages
Assembling A Toolset
Development Tools
OGRE Libraries
List of Libraries
Tools
Tools Home
DCC Tools
DCC Tutorials
DCC Articles
DCC Resources
Assembling a production pipeline
Development
Development Home
Roadmap
Building Ogre
Installing the Ogre SDK
Setting Up An Application
Ogre Wiki Tutorial Framework
Frequently Asked Questions
Google Summer Of Code
Help Requested
Ogre Core Articles
Community
Community Home
Projects Using Ogre
Recommended Reading
Contractors
Wiki
Immediate Wiki Tasklist
Wiki Ideas
Wiki Guidelines
Article Writing Guidelines
Wiki Styles
Wiki Page Tracker
Ogre Wiki Help
Ogre Wiki Help Overview
Help - Basic Syntax
Help - Images
Help - Pages and Structures
Help - Wiki Plugins
Toolbox
Freetags
Categories
List Pages
Structures
Trackers
Statistics
Rankings
List Galleries
Ogre Lexicon
Comments
History: Eclipse MingW STLPort
View page
Source of version: 13
(current)
%prevogre% {DIV(class="Layout_box4")}%warning2% Warning: This guide is deprecated - use this guide instead: ((Eclipse MinGW)){DIV} {BOX(class="Layout_box2", width="100%")}{DIV(class="bigBold")}Ogre3D SDK support in Eclipse{DIV}{BOX} !Install MingW For the sake of organization and simplicity, I will use the c:\devel as our root dir. Everything will go in there. !!MingW Core Get these: * [http://prdownloads.sf.net/mingw/binutils-2.16.91-20050827-1.tar.gz?download|binutils-2.16.91-20050827-1.tar.gz] * [http://prdownloads.sourceforge.net/mingw/gcc-core-3.4.2-20040916-1.tar.gz?download|gcc-core-3.4.2-20040916-1.tar.gz] * [http://prdownloads.sourceforge.net/mingw/gcc-g++-3.4.2-20040916-1.tar.gz?download|gcc-g++-3.4.2-20040916-1.tar.gz] * [http://prdownloads.sourceforge.net/mingw/mingw32-make-3.80.0-3.tar.gz?download|mingw32-make-3.80.0-3.tar.gz] * [http://prdownloads.sf.net/mingw/mingw-runtime-3.9.tar.gz?download|mingw-runtime-3.9.tar.gz] * [http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz?download|mingw-utils-0.3.tar.gz] * [http://prdownloads.sf.net/mingw/w32api-3.5.tar.gz?download|w32api-3.5.tar.gz] Unzip all of them in {MONO()}c:\devel\mingw{MONO} !!MSYS installation Download: * [http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe?download|MSYS-1.0.10.exe] Install it to {MONO()}c:\devel\msys{MONO} (not c:\devel\msys\1.0) Run post install and point the mingw installation to the right place (in our case: c:\devel\mingw) ''Note'': You need msys for some system funcionalities (such as __rm__). !!Configuration Put the BIN folders in your path (c:\devel\mingw\bin;c:\devel\msys\bin) ''Right-Click My Computer > Properties |Advanced| [[Environmental Variables], Click New'' Variable name: {MONO()}Path{MONO} Variable value: {MONO()}c:\devel\mingw\bin;c:\devel\msys\bin{MONO} !!Checking * gcc -v You should get something like {CODE(wrap="1", colors="bash")}gcc version 3.4.2 (mingw-special){CODE} * rm --version You should get something like {CODE(wrap="1", colors="bash")}rm (fileutils) 4.1{CODE} !Install OgreSDK Download: * [http://www.ogre3d.org/index.php?option=com_remository&Itemid=57&func=fileinfo&filecatid=49&parent=category|OGRE 1.2.0RC1 SDK for Code::Blocks + MinGW + STLPort] Install it to {MONO()}c:\devel\ogre\OgreSDK{MONO} (useful if you want to have the source available for reference in {MONO()}c:\devel\ogre\ogrenew{MONO}) !Install Eclipse !!The Core * [http://www.eclipse.org/downloads/|Download Eclipse] * Extract It * Run Eclipse.exe (Set the workspace to anywhere you like. I like to use c:\devel\workspace) !!C/C++ Developement Tools Plugin Install the C/C++ Development Tools Plugin * Click {MONO()}Help > Software Updates > Find and Install{MONO} * Select the "Search for new features to install" option and click Next * Check "Callisto Discovery Site" and click Finish * Expand "Callisto Discovery Site" and Check "C/C++ Development Tools" * Click through the Dialogs to Install and Click Yes when asked whether to reset the workspace !!OgreSDK Configuration Go to Window->Preferences->C/C++->PathEntry Variables Click NEW Put this info: * Name: {MONO()}OgreSDK{MONO} * Location: {MONO()}C:\devel\ogre\OgreSDK{MONO} !!Other Configuration Options * Emacs Bindings: If you like the emacs style bindings go to Windows > Preferences, General > Keys > |Modify|, Switch the Scheme Pulldown to Emacs * Disable Auto-Build: Click Project > Uncheck Build Automatically !Creating a New Project * File->New->Project * C++->Managed make project * Set a name for your project * Right-Click your Project in the Left Pane and Click Properties * Click C/C++ Build on the Left !!Build Configuration * Set the Configuration Pull-Down to __Release__ or __Debug__ and enter the options from the table below: !!!GCC C++ Compiler ||:::__Preprocessor__::: Add the Following Defined Symbols%%%* _STLP_NO_CUSTOM_IO%%%%%%If your app does not define any custom IO templates then this define will speed up compiles.%%%* _STLP_USE_DYNAMIC_LIB%%%This ensures that the DLL version of STLPort is used.%%%* WIN32%%%* _WINDOWS __Release__|__Debug__ {MONO()}NDEBUG{MONO}|{MONO()}_DEBUG{MONO}%%%{MONO()}_STLP_DEBUG{MONO} :::__Directories__::: Add the Following Directories%%%__Important:__ Keep the quotes when entering directories.%%%{MONO()}"${OGRE_HOME}\stlport\stlport"{MONO}%%%__VERY IMPORTANT:__ The stlport include directory has to be first in the include directories. If it is not then headers used for libstdc++ could get included which will cause conflicts with stlport during the link stage. You will most likely get undefined reference error messages with member methods saying they require std::string (method parameters). You should never see std:: in an error message and if you do then it means that the STLPort headers were not found and libstdc++ headers were used instead. If you do end up in this scenerio, after you correct the directory problem you must do a rebuild so that everything gets recompiled with the proper headers. Selecting build won't do it since CB will just attempt to do the link stage again since it doesn't detect any changes in the source and will fail again.%%%{MONO()}"${OGRE_HOME}\include"{MONO}%%%{MONO()}Your project include directories{MONO} :::__Miscellaneous__::: Change the Other Flags line to the following:%%%{MONO()}-c -fmessage-length=0 -mthreads -fexceptions -fident {MONO}|| !!!GCC C++ Linker ||:::__Libraries__::: Add the Following to "Libraries -l"%%%{MONO()}Your project dll's or static libs (.a){MONO} __Release__|__Debug__ {MONO()}OgreMain{MONO}%%%This is the name of the release build of OgreMain dll.%%%{MONO()}stlport.5.0{MONO}%%%This must be the last entry.|{MONO()}OgreMain_d{MONO}%%%This is the name of the debug build of OgreMain dll.%%%{MONO()}stlportstlg.5.0{MONO}%%%This must be the last entry. Add the Following to "Library Search Path -L" __Release__|__Debug__ {MONO()}"${OGRE_HOME}\bin\release"{MONO}|{MONO()}"${OGRE_HOME}\bin\debug"{MONO} :::__Miscellaneous__::: Add the Following to "Other Options (-Xlinker)"%%%{MONO()}~np~--enable-auto-image-base~/np~{MONO}%%%{MONO()}~np~--add-stdcall-alias~/np~{MONO}|| !!Notes * Eclipse will build with the Configuration you leave selected. You can also change this under Project > Active Build Configuration * OGRE_HOME is a pre-defined environment variable setup by the SDK installer. OGRE_HOME points to the directory where the SDK is installed. You can use ${OGRE_HOME} within your build options when setting up paths to specific directories with the SDK that you will need to access. * __WARNING:__ Do not mix dll and static object builds using different STL implementations. Here is an example: You build a dll using stdlibc++ but your exe is built using STLPort. Everything that is c++ must be built using STLPort. This does not apply to C static libs and dll's. * ''Note: Many of the configuration settings are based on this page: ((CodeBlocks MingW STLPort))'' !!Basic Tutorial 1 We can test our project with ((Basic Tutorial 1)) * Make a New C++ Source File, name it something like ''Tutorial1.cpp'' * Copy the Code from ((Basic Tutorial 1|#Getting Started)) into the file * We need to tell the compiler where ExampleApplication.h is. ** Under the Project Properties ** C/C++ Build > Directories > Include Paths, Add: ** "${OGRE_HOME}\samples\include" * Click Project > Build All !!Required Files !!!Ogre Files If you try running your program it will complain about missing DLLs. * Copy all the files in c:\Devel\Ogre\OgreSDK\bin\release to your Release Build Directory in the Workspace (Where the .exe is), Do the same for the Debug directories. If you try running now Ogre will give an error about not finding the media directory. * Copy the c:\Devel\Ogre\OgreSDK\media Folder to your Workspace directory, (2 directories below your .exe) ''Note: The resources.cfg file tells Ogre where to find these media files. If you wish to put this folder somewhere else you need to edit this file.'' ''Note: Cleaning your project will remove all these files, I'm not sure how to change this behavior'' !!!DirectX If you don't have the DirectX Runtime installed you will get an error about a missing __d3dx9_29.dll__ When you try a debug build it will complain about a missing __d3dx9d_29.dll__ file. * Ogre 1.2.2 (8/10/2006) requires the 29 DLLs. End-Users just need the Latest DirectX Runtime (Supplies the __d3dx9_##.dll__ file needed for your Release build): * [http://www.microsoft.com/downloads/details.aspx?FamilyId=A1788990-5E11-4AE2-B5E7-CC576822AED4&displaylang=en|DirectX End-User Runtime August Redist] ''Versions 24-30?'' * For a quick and dirty solution you can get the individual DLLs at [http://www.toymaker.info/Games/html/d3dx_dlls.html|this site] I believe August may come with all ''d3dx9_##.dll'''s from 24-30, so you don't need to worry about getting the older version, I haven't confirmed this though. There's no way to uninstall DirectX so I can't determine whether a new install comes with all the versions. To __Debug__ you need the [http://msdn.microsoft.com/directx/sdk/|DirectX SDK] (Supplies the __d3dx9d_##.dll__ file needed for your Debug build): __Note:__ The SDKs come with only one ''d3dx9d_##.dll'' file. April, June, and August are 30. February is 29. * [http://www.microsoft.com/downloads/details.aspx?FamilyID=EDB98FFA-A59C-4C23-9B92-BA304F188314&displaylang=en|DirectX SDK February Redist] ''Version 29 only'' * [http://www.microsoft.com/downloads/details.aspx?FamilyID=c72d9f1e-53f3-4747-8490-6801d8e8b4ef&DisplayLang=en|DirectX SDK August Redist] ''Version 30 only'' !!Eclipse Ogre Plugin - No Longer Available Once upon a time there was an Eclipse Ogre Plugin that would setup the build for you, here's the old text: Get the Eclipse plugin for Ogre here: [http://www.s3006.com.br/sergio/ogre.toolchain.zip|ogre.toolchain.zip] Unzip it inside eclipse directory (c:\devel\eclipse) UPDATE 6/22/2006 - This link is broken. There's no good way to continue through this procedure without it, but it's been suggested in the forums ([http://www.ogre3d.org/phpBB2/viewtopic.php?t=21906)] that you can use the configuration information that has been supplied for Code::Blocks to setup Eclipse and things should work. It would be nice if someone could share this file, though. UPDATE 8/10/2006 - I've added this configuration information to this page.
Search by Tags
Search Wiki by Freetags
Latest Changes
One Function Ogre
IDE Eclipse
FMOD SoundManager
HDRlib
Building Ogre V2 with CMake
Ogre 2.1 FAQ
Minimal Ogre Collision
Artifex Terra
OpenMB
Advanced Mogre Framework
...more
Search
Find
Advanced
Search Help
Online Users
151 online users