Use mingw to compile ogre-1.7.1

Source: Internet
Author: User
Tags doxygen unpack

How to Build ogre-1.7.1 with mingw

1. Download

Http://bitbucket.org/sinbad/ogre

Use tortoisehg to clone source repository to D:/prj/ogre.
Http://www.ogre3d.org/download/source

Get mingw precompiled dependencies.
Http://www.cmake.org/cmake/resources/software.html

Get cmake Installer (cmake-* -win32-x86.exe ).
Http://www.boost.org

Get boost.
Http://www.microsoft.com/downloads/en/resultsForCategory.aspx? Categoryid = 2

Get latest DirectX SDK.
Http://www.doxygen.org

Get doxygen installer.
Http://www.graphviz.org

Get graphviz installer.
Http://freeimage.sourceforge.net/download.html

Get freeimage source.

2. Prepare
. Install dxsdk, doxygen, graphviz.
. Build and install boost to C:/boost.
. Clone a working copy to D:/prj/ogre/v1-7.
D:
Hg clone/prj/ogre/v1-7
CD/prj/ogre/v1-7
. Import patches if necessary, using "Hg import path_to_patch_file ".
. Create a build directory.
Mkdir/prj/ogre/build-ogre-1.7
. Unpack mingw precompiled dependencies, I. e. ogredependencies_mingw_20100216.zip, to/prj/ogre/build-ogre-1.7.
//////////////////////////////////////// ///////////////////////////////////////
Optional:
# If 0
. Remove * freeimage * files under D:/prj/ogre/build-ogre-1.7/dependecies.
. Unpack freeimage source to D:/prj.
. Build as static library, copy files to dependency directories:
D:
CD/prj/freeimage
Set freeimage_library_type = static
Make-J3> build. log 2> & 1
Copy Dist/freeimage. h/prj/ogre/build-ogre-1.7/dependencies/include/
Copy Dist/freeimage. A/prj/ogre/build-ogre-1.7/dependencies/lib/release/
Copy Dist/freeimage. A/prj/ogre/build-ogre-1.7/dependencies/lib/debug/
# Endif
//////////////////////////////////////// ///////////////////////////////////////

3. Run cmake
. Set "where is the source code:" to "D:/prj/ogre/v1-7 ".
. Set "where to build the Binaries:" to "D:/prj/ogre/build-ogre-1.7 ".
. Click "Configure" button.
. Choose "Eclipse cdt4-mingw makefiles", or "mingw makefiles" w/o eclipse.
. Choose "use default native compilers ".
. Click "finish" button.
. Switch to "Advanced View", set cmake entries values:
Cmake_make_program: filepath = make
Cmake_sh: filepathcmd.exe
Cmake_use_relative_paths: bool = on
. Click "Configure" button.
. Verify/modify the following entries:
Boost_include_dir: Path = C:/Boost/include (default)
Cmake_build_type: String = relwithdebinfo (default)
Cmake_eclipse_executable: filepath = C:/program files/Eclipse/eclipse.exe (if w/eclipse)
//////////////////////////////////////// ///////////////////////////////
Optional:
# If 0
Cmake_exe_linker_flags: String =-wl, -- enable-auto-Import
Cmake_module_linker_flags: String =-wl, -- enable-auto-Import
Cmake_shared_linker_flags: String =-wl, -- enable-auto-Import
# Endif
//////////////////////////////////////// ///////////////////////////////
Cmake_verbose_makefile: bool = on
Ogre_dependencies_dir: Path = D:/prj/ogre/build-ogre-1.7/Dependencies
Ogre_install_docs: bool = on (optional if doxygen installed)
Ogre_install_samples: bool = on
Zlib_library_dbg: filepath = D:/prj/ogre/build-ogre-1.7/dependencies/lib/debug/libzlibd.
Zlib_library_rel: filepath = D:/prj/ogre/build-ogre-1.7/dependencies/lib/release/libzlib.
. Click "Configure" button.
. Click "generate" button.

4. Compile
D:
CD, prj, ogre, build, ogre-1.7
Set lang = en_us
Make-J3 install> build. log 2> & 1
Copy C:/Boost/lib/libboost_thread-* Mt. dll/prj/ogre/build-ogre-1.7/SDK/bin/relwithdebinfo/
. Now Ogre SDK in D:/prj/ogre/build-ogre-1.7/SDK.

4. Reference
Http://www.ogre3d.org/wiki/index.php/Building_With_CMake

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.