How to build OGRE on Windows

OGRE is a bit difficult to compile on Windows because of the many libraries it depends on.

Build OGRE dependencies

  • Clone the OGRE Dependencies repository. This has the source code of all the OGRE dependent libraries.

  • Build it using CMake. Make sure you set CMAKE_INSTALL_PREFIX to a separate subdirectory since this path will be used while building OGRE.

  • If you get error on unistd.h, comment that line. I found it could build without using it.

Build OGRE

  • Download the source code of OGRE or clone from its repository.

  • Build it using CMake. Set the variable OGRE_DEPENDENCIES_DIR to the install path you set while building the dependencies. Set the CMAKE_INSTALL_PREFIX variable to the place where you want the OGRE libraries and executables need to be placed after build.


Pre-built libraries of OGRE for recent Visual Studio versions can be downloaded from here.


Tried with: OGRE 1.8.1, Visual Studio 2013 and Windows 7 x64

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.