Getting Started on Windows

Get Yake

If you read this offline, please visit the online version on http://www.yake.org for updated information.

The easiest way to acquire the sources is to grab a source package from the Downloads page. Alternatively, you can retrieve the sources from the Subversion repository: SVN Access.

Directory Layout

Regardless how you acquire the sources you will have a directory tree like the following. The build directory is created through the build process.

yake/root directory (often referred to as YAKE_ROOT)
yake/yakeall headers (.h)
yake/srcall sources (.cpp, …)
yake/samplessample applications
yake/dependenciesall 3rd party dependencies like boost, Ogre, ODE, Lua etc.
yake/mediaall data files like meshes, materials, textures, Lua scripts, etc.

The root path ()) is often referred to as YAKE_ROOT in documentation and build scripts.

In order to compile Yake you need several dependencies.

Dependencies

Several prebuilt dependency packages are available on the Downloads page.

After downloading extract the package (with full paths) into the Yake root directory (YAKE_ROOT).

Toolset

Before building Yake decide which toolset to use.

You can see available toolsets by opening a command shell in the Yake root directory (YAKE_ROOT) and entering: premake4 –help.

Here is a list of typical ones used on Windows:

vs2005Visual C++ 2005 (8.0) (with or without service pack 1)
vs2008Visual C++ 2008 (9.0)
vs2010Visual C++ 2010 (10.0)
gccGCC (for example, MinGW)

Build Yake Libraries

After deciding which toolset to use, open the appropriate command shell for your compiler (for example, “Visual C++ 2008 Command Prompt”).

  1. To create the build scripts: YAKE_ROOT> premake4 toolset
  2. Open YAKE_ROOT\build\toolset\yake.sln in your Visual C++'s IDE
  3. Select Build All

Optionally, you can put all the .lib and .dll files into a stage directory with YAKE_ROOT> premake4 stage.

Link Your Program to a Yake Library

  1. Add the following paths to your program's include path setting: YAKE_ROOT, YAKE_ROOT\dependencies\boost
  2. Add the following paths to your program's library path setting: YAKE_ROOT\build\stage or YAKE_ROOT\build\toolset\lib, and YAKE_ROOT\dependencies\boost\stage\lib.
  3. If you compiler supports auto-linking then you can skip this step: Add the library file's name to your project's linker settings. For example, if you want to link to yake::base then add yake_base_d.lib to the Debug target and yake_base.lib to the Release target.

TIP: For the Visual C++ compiler Yake supports auto-linking, i.e. if you include a header of a Yake library then it automatically informs the compiler that it has to link to the Yake library .lib file.

See this tutorial for detailed steps on how to setup a project: setting_up_an_application_with_vc

Library Naming

Yake's libraries' names are defined using the following scheme:

  1. prefix: yake_
  2. library name: name_ (for example base or graphics)
  3. compiler/toolset id: id_ (for example vc90 for Visual C++ 2008 (9.0))
  4. target postfix: d for debug libraries, not postfix for release libraries
  5. extension: .lib for import libraries, .dll for dynamic libraries

Examples:

  • yake_base_vc90_d.lib
  • yake_graphics_gcc.lib
  • Bookmark "Getting Started on Windows" at del.icio.us
  • Bookmark "Getting Started on Windows" at Digg
  • Bookmark "Getting Started on Windows" at Reddit
  • Bookmark "Getting Started on Windows" at Google
  • Bookmark "Getting Started on Windows" at StumbleUpon
  • Bookmark "Getting Started on Windows" at Technorati
  • Bookmark "Getting Started on Windows" at Facebook
  • Bookmark "Getting Started on Windows" at Twitter
  • Bookmark "Getting Started on Windows" at Slashdot
wiki/getting_started/windows.txt · Last modified: 2010/03/30 16:02 by psyclonist
CC Attribution-Noncommercial-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Valid XHTML 1.0