Ogre 1.7.2 Compilation Method

Source: Internet
Author: User
Tags tikiwiki

Address: http://blog.csdn.net/weiqubo/article/details/7082006

 

1. To compile ogre, at least the source code of ogre is required. Can go to the official website to download the latest source package, I use 1.7.2 here, download the file called ogre_src_v1-7-2.exe. Run the Downloaded Program and decompress the source code to a directory for backup.

2. download and install the DirectX SDK. the officially recommended version is

DirectX SDK-February 2010. Different Versions of dxsdk may cause ogre compilation failure.

3. Install the boost library. This is not required, but it is recommended to install it to improve performance and enable background loading and other functions.

The recommended boost library version is 1.44.0, which can be downloaded by Windows users

Boostpro boost installers is installed. During installation, make sure that "multithreaded" and "multithreaded debug" are selected. When selecting a library, select boost date time and boost thread.

4. Download the dependency package. The Ogre dependency package can be found in

Visual Studio dependencies. Decompress the downloaded dependency package to the directory where the Ogre source code is located, and keep the default folder name "dependencies. The location of the decompressed dependency package is as follows.

5. Enter the SRC folder under the directory of the dependent package that has just been pressurized, open ogredependencies. vs2010.sln, debug and release each compile once.

6. Download and install cmake. The official website is http://www.cmake.org /.

Now, all the preparations before compilation are completed. The Ogre compilation process is now available.

1. Start cmake,

Enter the Ogre source code path in "where is the source code,

Enter the path generated by the compilation environment in "where to build the binaries,

This path can point to a non-existent Directory, which is automatically created by cmake. The entire ogre compilation will be carried out in this path in the future.

2. Click the Configure button in the lower-left corner of the cmake interface. For the first configuration, select the compiler. We select vs2010 32bit.

3. After the configuration is complete for the first time, you can see that the configuration options are all red. Then, click the Configure button again. After the configuration is complete, the options change to Gray. (This step uses the default ogre configuration to configure the compilation environment)

4. After the configuration is complete, click Generate on the right of the Configure button to generate the project.

5. After the execution is complete, cmake will generate the project to the "where to build the binaries" path configured earlier.

6. Open the "where to build the binaries" path and you will find that cmake has generated the entire ogre project for us. Open ogre. sln and compile it.

References:

Building ogre: How to build ogre and/or your own projects using ogre

Http://www.ogre3d.org/tikiwiki/Building+Ogre&structure=Development

Cmake Quick Start Guide

Http://www.ogre3d.org/tikiwiki/CMake+Quick+Start+Guide

Appendix:

Ogre 1.7.0 download, configuration, and Compilation Guide
  1. Https://sourceforge.net/projects/ogre/files/ogre/1.7/ogre-v1-7-0.zip/download for ogre 1.7.0
  2. Ogre 1.7.0 dependent Library (occasionally updated, please pay attention to this post): http://www.ogre3d.org/forums/viewtopic.php? F = 1 & t = 54533
  3. Decompress ogre, it is recommended to decompress the generated ogre directory to the corresponding version, for example: F: \ SDK \ ogre-v1-7-0, to distinguish each version
  4. Decompress the dependent Library to the ogre directory, for example, F: \ SDK \ ogre-v1-7-0 \ Dependencies
  5. Open the project vs20xx. sln in the F: \ SDK \ ogre-v1-7-0 \ dependencies \ src directory according to your own VC version
  6. Compile the debug and release of the dependent Library
  7. Download the latest cmake: http://www.cmake.org/cmake/resources/software.html
  8. Decompress cmake to any directory, such as: F: \ tools \ cmake-2.8.0-win32-x86
  9. Run f: \ tools \ cmake-2.8.0-win32-x86 \ bin \ cmake-gui.exe
  10. Set the Ogre decompression path in "where is the source code" and "where to build the binaries", for example, F: \ SDK \ ogre-v1-7-0
  11. Click Configure and select the VC version.
  12. Click Generate to generate ogre. sln
  13. Compile the debug and release of ogre.
  14. If you do not need to run samples, you only need to compile ogremain, rendersystem_direct3d9 (or other) and the required plugin.

Cegui 0.7.1 download, configuration, and Compilation Guide
  • 1. cegui 0.7.1: http://prdownloads.sourceforge.net/crayzedsgui/CEGUI-0.7.1.zip? Download
  • 2. cegui 0.7.1 dependent Library: http://prdownloads.sourceforge.net/crayzedsgui/CEGUI-DEPS-0.7.x-r1-vc9.zip? Download
  • 3. decompress the cegui, it is recommended to decompress the generated cegui directory to change the corresponding version number, for example: F: \ SDK \ cegui-v0-7-1, to distinguish each version
  • 4. decompress the dependent Library to the cegui directory, for example: F: \ SDK \ cegui-v0-7-1 \ Dependencies
  • 5. Go to the directory F: \ SDK \ cegui-v0-7-1 \ projects \ premake
  • 6. Open config. Lua in the directory in notepad and find two variables: ogre_paths and ois_paths.
  • 7. Change it to the corresponding ogre and OIS paths, for example:
OGRE_PATHS = { "F:\SDK\ogre-v1-7-0", "OgreMain/include", "lib" }
    OIS_PATHS = { "F:\SDK\ogre-v1-7-0/Dependencies/include/OIS/", "", "lib" }
  • 8. Find the cegui_old_ois_api variable and set it to false.
  • 9. Find the ogre_renderer variable and set it to true.
  • 10. Find the samples_ogre variable and set it to true.
  • 11. Go to the directory F: \ SDK \ cegui-v0-7-1 \ projects \ premake and run build_vs2008.bat (or another version), you will see cegui. sln
  • 12. Continue to run build_samples_vs2008.bat (or another version). You will see ceguisamples. sln
  • 13. compile cegui. SLN and ceguisamples. if H or link error still persists during SLN, open the project properties and modify the ogre and OIS related paths in additional include directories and additional library directories.
  • 14. Note that the Lib of ogre 1.7.0 is generated in the debug and release subdirectories. Remember to change it to the correct link path.
  • 15. before running the sample, remember to copy all the DLL under F: \ SDK \ cegui-v0-7-1 \ dependencies \ bin to F: \ SDK \ cegui-v0-7-1 \ bin, so that no error is reported that the DLL is missing

Configuration suggestions for various open-source libraries
  1. Right-click my computer and choose Properties> advanced> environment variables.
  2. Create the corresponding variable name and PATH value according to the names of different open source libraries, for example: Variable ogre, value is F: \ SDK \ ogre-v1-7-0
  3. Change the previous dead path in the additional include directories and additional library directories of VC to the following: $ (Ogre)/ogremain/include
  4. In the future, when ogre or cegui is upgraded, you do not need to manually modify the paths one by one. You only need to modify the corresponding environment variable values (paths) at a time.
  5. Note that when the environment variable changes, VC must restart to identify

Mygui Compilation

SourceForge source http://sourceforge.net/projects/my-gui/files/

Download mygui and mygui dependencies, and decompress them to F: \ mygui \ mygui3.0. Put Dependencies under the mygui3.0 folder.

Use vs2008 to open the solution file in F: \ mygui \ mygui3.0 \ dependencies \ SRC. Compile the freetype-2.3.11 and ois-1.2.0 respectively,

In F: \ mygui \ mygui3.0 \ dependencies \ Lib

And F: \ mygui \ mygui3.0 \ dependencies \ bin to obtain the. lib and. DLL files.

Open the solution file in F: \ mygui \ mygui3.0 \ solution_directx, and set the include and. Lib files:

1. Tools --- options --- projects and solutions --- in VC ++ Directories

Include files contains

F: \ mygui \ mygui3.0 \ myguiengine \ include and

F: \ mygui \ mygui3.0 \ dependencies \ include

Library files include

F: \ mygui \ mygui3.0 \ dependencies \ Lib \ debug and

F: \ mygui \ mygui3.0 \ dependencies \ Lib \ release

2. copy ois_d.dll from F: \ mygui \ mygui3.0 \ dependencies \ bin \ debug to F: \ mygui \ mygui3.0 \ solution_directx \ bin \ debug (# Add release version is the same ).

3. Select a demo project in the mygui solution that is opened to compile the connection successfully. You can view the running results.

Note: Make sure that the dx sdk is installed. Of course, you can also use ogre or OpenGL to render the mygui. If the Ogre library is installed, you can open the demos of ogre.

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.