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: Building Ogre Dummy Guide MinGW
View page
Source of version: 4
(current)
{DIV(class="achtung")}__IMPORTANT:__ These instructions are meant to be used with old releases of Ogre. For Ogre 1.10+, rather use [https://ogrecave.github.io/ogre/api/latest/building-ogre.html|BuildingOgre.md].{DIV} {BOX(width="100%",class="Layout_box9")}{SPLIT(colsize=10%|70%)} {IMG(src="tiki-download_file.php?fileId=2144&display",height="100",alt="GCC Logo",link="Building Ogre Dummy Guide MinGW",imalign="left",title="Dummy guide to building Ogre with MinGW")}{IMG} --- {DIV(class="bigBold")}((Building Ogre Dummy Guide MinGW|Dummy guide to building Ogre with MinGW)){DIV} This is command by command guide to build Ogre with MinGW under Windows. It is tested on Win7 and Ogre 1.9. 09/2014 {SPLIT}{BOX} !!Introduction This tutorial is based on ((Building Ogre with boost 1.50 upwards and MinGW)). I decided to write this after I have spent several days making Ogre compile on windows. There are some small things you can overlook, or forgot to do. On linux you basicaly run one sudo-apt-get-install command, one hg-clone, cd, mkdir build, make install -j8 and you are done. In windows this is not that simple. So here is mine command by command guide. You almost do not have to think and you should end up with ogre ready to work. You just insert command after command in your command line. :) !!Download them all You need to download all this and place/install it into the right directories (boost, MinGW). In case of ogre and ogre-dependencies you can run command in whatever place you like, the path to download is present in commands itselfs. {FANCYTABLE(head="what | where to install | from where / command")}CMake | | http://www.cmake.org/cmake/resources/software.html mercurial | | http://tortoisehg.bitbucket.org/download/index.html git | | http://git-scm.com/ DirectX SDK | | http://www.microsoft.com/en-us/download/details.aspx?id=6812 boost | c:\boost | http://www.boost.org/users/download/ mingw+msys | c:\MinGW | http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download ogre | c:\ogre | hg clone http://bitbucket.org/sinbad/ogre/ c:\ogre ogre-dependencies | c:\ogre-dep | hg clone https://bitbucket.org/cabalistic/ogredeps/downloads c:\ogre-dep{FANCYTABLE} !!Build Boost {CODE(wrap="1", colors="c++")} set PATH=%PATH%;C:\MinGW\bin;C:\MinGW\msys\1.0\bin mkdir c:\boost\build cd c:\boost\tools\build\v2 bootstrap.bat gcc b2 install --prefix=C:\boost\build set PATH=%PATH%;C:\boost\build\bin cd c:\boost b2 --build-dir=C:\boost\build toolset=gcc --build-type=complete stage{CODE} get a cofee, lunch or go to sleep, this will take several hours {CODE(wrap="1", colors="c++")} move stage\lib ./ set PATH=%PATH%;C:\boost set BOOST_ROOT=C:\boost set Boost_DIR=C:\boost setx BOOST_ROOT C:\boost setx Boost_DIR C:\boost {CODE} !!Build Ogre dependencies {CODE(wrap="1", colors="c++")} set PATH=%PATH%;C:\MinGW\bin;C:\MinGW\msys\1.0\bin;C:\boost;C:\Program Files (x86)\CMake 2.8\bin cd c:\ogre-dep mkdir build cd build cmake -G "MSYS Makefiles" .. make install {CODE} This should take few minutes {CODE(wrap="1", colors="c++")} cmake .. -DCMAKE_BUILD_TYPE=Debug make clean make install #again... max few minutes set OGRE_DEPENDENCIES_DIR=C:\ogre-dep\build\ogredeps setx OGRE_DEPENDENCIES_DIR C:\ogre-dep\build\ogredeps {CODE} !!Build Ogre These three build can run in separated command lines - you can save some time by this, provided you have more cores. Building Ogre will take few hours. {CODE(wrap="1", colors="c++")} #Regular set PATH=%PATH%;C:\MinGW\bin;C:\MinGW\msys\1.0\bin;C:\boost;C:\Program Files (x86)\CMake 2.8\bin cd c:\ogre hg update v1-9 mkdir build cd build cmake -G "MSYS Makefiles" .. -DOGRE_BUILD_RENDERSYSTEM_D3D11=FALSE make install {CODE} {CODE(wrap="1", colors="c++")} #Debug cd c:\ogre mkdir buildd cd buildd cmake .. -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=C:/ogre/build/sdk -DOGRE_BUILD_RENDERSYSTEM_D3D11=FALSE make install {CODE} {CODE(wrap="1", colors="c++")} #Small size librearies cd c:\ogre mkdir buildmin cd buildmin cmake .. -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=C:/ogre/build/sdk -DOGRE_BUILD_RENDERSYSTEM_D3D11=FALSE make install {CODE} And finaly {CODE(wrap="1", colors="c++")} set OGRE_HOME=C:\ogre\build\sdk setx OGRE_HOME C:\ogre\build\sdk {CODE} !! Add things to PATH Let us fall back to gui... right click on "The computer" Pick properties Go to system variables search for PATH add this: {CODE(wrap="1", colors="c++")} ;C:\MinGW\bin;C:\MinGW\msys\1.0\bin;C:\boost;C:\Program Files (x86)\CMake 2.8\bin {CODE} to the end of PATH !!Let us test I have prepared small clean project which compiles fine under Linux and Windows {CODE(wrap="1", colors="c++")} cd path/to/dev/directory git clone https://github.com/kracejic/ogreclean.git cd ogreclean {CODE} With these steps you will build and run this projects. If you have problems with off_t and off64_t, please see troubleshooting section at the end. {CODE(wrap="1", colors="c++")} cd d:\some_path_to_your_project mkdir build cd build cmake .. -G "MSYS Makefiles" -DOGRE_FRAMEWORK_INCLUDES=c:/ogre/build/sdk/include -DOGRE_FRAMEWORK_PATH=c:/ogre/build/sdk make install cd dist/bin NameOfYourApp.exe #If you want to have min size libraries use this cmake instead: cmake .. -G "MSYS Makefiles" -DOGRE_FRAMEWORK_INCLUDES=c:/ogre/build/sdk/include -DOGRE_FRAMEWORK_PATH=c:/ogre/build/sdk -DCMAKE_BUILD_TYPE=MinSizeRel {CODE} !Troubleshooting !!!Problems with off_t and off64_t run editor on this file C:\MinGW\include\sys\types.h You need to move change few line to look like this... I know this is ugly, i did not have time to look for better solution, if you have one, please edit this page. :) {CODE(wrap="1", colors="c++")} #ifndef _OFF_T_ #define _OFF_T_ typedef long _off_t; typedef _off_t off_t; #ifndef __STRICT_ANSI__ #endif /* __STRICT_ANSI__ */ #endif /* Not _OFF_T_ */ #ifndef _OFF64_T_ #define _OFF64_T_ typedef __int64 _off64_t; typedef __int64 off64_t; #ifndef __STRICT_ANSI__ #endif /* __STRICT_ANSI__ */ #endif /* ndef _OFF64_T */ {CODE}
Search by Tags
Search Wiki by Freetags
Latest Changes
FMOD SoundManager
HDRlib
Building Ogre V2 with CMake
Ogre 2.1 FAQ
Minimal Ogre Collision
Artifex Terra
OpenMB
Advanced Mogre Framework
MogreSocks
Critter AI
...more
Search
Find
Advanced
Search Help
Online Users
31 online users