Getting Started

Tk11 is a source code library which is meant to be compiled into a static library that is linked into applications. Here you will learn how to build the Tk11 library and how to set up the build system for your own application so you can use the Tk11 library.

If you know how to build a static library from source code and use it, and you are already using Boost in your own projects, you can probably skip these instructions entirely, as you probably already know what to do.

For each step, instructions are provided for users of Microsoft Visual Studio 2008 Express ("MSVC). If you are using a different build system, you will have to figure out the details yourself. However, I will try my best to provide general build instructions first, so you should get an idea what you have to do.

Download Tk11

The source code and documentation of of Tk11 can be downloaded here:

https://sourceforge.net/projects/tk11/files/

You can also get the latest version of Tk11 from the SVN repository at SourceForge, using the following URL:

https://tk11.svn.sourceforge.net/svnroot/tk11/trunk

To access the repository, you need an SVN client, such as TortoiseSVN (http://tortoisesvn.tigris.org/). Create an empty directory named "tk11", right-click on the folder icon in Explorer and choose "SVN Checkout". Then enter the above URL as "URL of repository" and click "OK".

Boost

Tk11 requires the Boost header files in order to build, and so does every application which uses Tk11 directly (this means: includes Tk11 headers). Tk11 has been tested with Boost version 1.42.0, however newer versions and maybe older versions should also be fine.

You do not need to build the Boost library or install any Boost binaries. If you choose to do so anyway, please follow the official build instructions for Boost at http://www.boost.org/doc/libs/1_42_0/more/getting_started/index.html and skip this section.

In MSVC, open the Options dialog. In the Projects and Solutions category, select the tab "VC++ Directories". Select "Include Files" in the dropdown box and add the path to the Boost headers.

That's it. If you have any Boost-related problems with Tk11, consider building Boost according to the official instructions (http://www.boost.org/doc/libs/1_42_0/more/getting_started/index.html). However, this should not be necessary, so feel free to send me a bug report if these instructions did not work for you.

DirectX SDK

In order to use Tk11 and Direct3D 11, you need the DirectX SDK. Tk11 was developed and tested with the February 2010 release of the SDK, however newer SDK versions should be supported as well.

You can get the DirectX SDK here: http://msdn.microsoft.com/en-us/directx/default.aspx

Building Tk11

In order to use the Tk11 library, you normally need to compile all source files and link them to a static library (.lib file) that you can link to your application. There are other obvious ways to include Tk11 in your application, such as simply linking the source files into your own projects. This works, and is within the terms of the license, but I will not provide instruction here.

Important: If you did not build the Boost libraries (i.e. you only installed the headers), then you must configure your compiler to define the following preprocessor symbol:

 BOOST_ALL_NO_LIB=1

In the MSVC project files included with the Tk11 release, this option is already enabled.

In MSVC, open the file tk11.sln and select the build configuration ("Release" or "Debug") and the platform ("Win32" or "x64") in the dropdown boxes at the top. Then right-click on the solution in the solution explorer and select "Build Solution". This will create the file tk11.lib in the subdirectory "Release" or "Debug", depending on your choice of configuration.

Note that for building the library for the x64 platform, you need a 64-bit compiler, which is available as part of the commercial version of Visual Studio and in the Windows SDK.

If you are using Tk11 both in Release and Debug builds, then you will have to build two versions of the library, one Debug version and one Release version. It is recommended that you first build both versions of tk11.lib and then rename the debug version to "tk11d.lib". Finally, put both files into a single directory of your choice.

Setting up your Project to use TK1

To integrate Tk11 into your own projects, you must ensure that the Tk11 header files are found by the compiler, and you must link your application or library against tk11.lib. In addition, your application must link against the Direct3D11 import libraries (d3d11.lib d3d10.lib dxgi.lib), which are part of the DirectX SDK.

In MSVC, open the options dialog. In the Projects and Solutions category, select the tab "VC++ Directories". Select "Include Files" in the dropdown box and add the path to the Tk11 headers. This is the directory which contains the directory "tk11". Next, select "Library Files" in the dropdown box and add the path to the directory which contains tk11.lib.

For each project which uses Tk11, open the project properties and select "All Configurations" in the configuration dropdown box. Then go to "Configuration Properties" / "Linker" / "Input" and add "tk11.lib d3d11.lib d3d10.lib dxgi.lib" to the "Additional Dependencies" property. If you are using Release and Debug versions of the Tk11 library, select "Debug" in the configuration dropdown box and replace "tk11.lib" by "tk11d.lib" in the "Additional Dependencies" property.

Important: If you did not build the Boost libraries (i.e. you only installed the headers), then you must configure your compiler to define the following preprocessor symbol:

 BOOST_ALL_NO_LIB=1

In MSVC, open the project properties and select "All Configurations" in the configuration dropdown box. Then go to "Configuration Properties" / "C++" / "Preprocessor" and add "BOOST_ALL_NO_LIB=1" to the "Preprocessor definitions" property.

If you have many project files in your solution (or you are planning to have many project files), you may want to create a property sheet. See the MSVC documentation. Property sheets are a very handy tool to avoid project property hell in large projects. Use it or be sorry.

I'm Done! So What's Next?

You are now ready for using Tk11 in your own projects. For getting started, have a look at the Tutorial Part 1 "Hello World" or the examples.

Tk11 Direct3D 11 Toolkit version 0.2 (SourceForge)
Copyright Florian Winter 2010 - 2010. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Generated on Sun Apr 11 20:22:59 2010 for Tk11 by  doxygen 1.6.3