|
What you need to build Ogre from source.
|
Introduction
This is a small check list of things you need to do before you're ready to build Ogre from source.
|
Install paths
Make sure that Cmake and the project are both installed in a folder with no spaces and latin characters only.
Compiler Specific Prerequisites
Visual Studio
Best thing is to start with the latest version of Visual Studio.
Download Download 'Visual Studio Community Free' from https://www.visualstudio.com/downloads and run vs_community_ENU.exe (installation takes about half and hour)
MinGW
Get the latest MinGW installer from here and install MinGW.
Make sure to include the C++ compiler (it is the only required compiler for Ogre, but installing all of them doesn't hurt).
You most likely do not want the full "MinGW Developer Toolkit", but you should check the "MSYS Basic System".
Install it to C:\mingw.
Also add C:\mingw\bin to your PATH. The installer might ask if it should do that for you, but if you did not install with admin rights, this likely did not work. In any case, you should check and make sure it is correctly added to your PATH.
DirectX
If you want to use DirectX in Ogre3D, the 'Windows Software Development Kit (SDK) for Windows 10' is required (if you are using Windows 10 of course).
Download it from https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk. Run 'sdksetup.exe' and install the SDK (this will take some time).
Mandatory for compiling SDL2 however, is the use of the DirectX Software Development Kit 'DirectX 9 SDK (DX SDK June 2010)'; this version is not used by
Ogre3D V2.1 (because it doesn't use DirectX 9 anymore), but it is only used for SDL2. SDL2 is used by the tutorial and samples, which are part of the Ogre source. Download DirectX 9 SDK from https://www.microsoft.com/en-us/download/confirmation.aspx?id=6812
Dependencies
A repository containing a all sources of the Ogre dependencies (along with the necessary CMake scripts) is available here at Bitbucket. Make sure to read our CMake Guide if you haven't yet.
The following two links are outdated and only relevant for Ogre 1.7. It is probably the best to simply build the dependencies using the repository and CMake as described above. But you may of course try to use them:
Visual Studio users need to compile the dependencies themselves: Visual Studio Dependencies
MinGW users can grab the precompiled MinGW Dependencies
Unpack the dependencies into either your Ogre source directory, your Ogre build directory or somewhere else.
The directory should be named Dependencies if put either into the source or the build directory (this ensures that the Ogre CMake scripts should automatically find and user it).
If you choose to place it elsewhere, you can name it however you like, as long as you're setting an environment variable OGRE_DEPENDENCIES_DIR pointing to its location.
It's recommended to use the last option - OGRE_DEPENDENCIES_DIR - as it makes it easier to manage several different dependencies (VC9, VC10, MinGW, etc.) on the same computer, against the same Ogre source directory.
Additional information for OIS linking error with dxguid.lib can be found in the forums.
Building FreeImage with Visual Studio once was buggy (_ITERATOR_DEBUG_LEVEL bug). If you experience any issues, you can compile FreeImage in the following way:
- Build the full FreeImage packet on Debug for all platforms
- Switch actual configuration to Release
- Save the project map and close VS
- Delete all temporary folders of the project (look for "Intermediate Directory")
- Start VS and load FreeImage project
- Build the full FreeImage packet on Release for all platforms
|