DI-Guy SDK Documentation  13.7.1
9.1 - Compiling and Linking DI-Guy on Windows

The DI-Guy SDK header files are in /include.

They are standard C++ header files, and specify the API available to programs using DI-Guy. The full reference for the API is in DI-Guy SDK Reference Manual.

The DI-Guy SDK includes several DI-Guy library versions, each compiled with different options. These options determine which instruction set is used, the linking convention, the level of optimization, and whether debugging symbols are present.

Windows libraries are located in ./lib/win/(compiler_version)/, where (compiler_version) is the version of the compiler the library has been compiled for. For example, the library directory for the Windows x86 instruction set, Visual C++ 9, MD runtime library is: win\x86_vc9_md.

9.1.1 Release and Debug Versions of DI-Guy Libraries

Visual C++ for Windows has a number of versions of its C Runtime Library. (The Runtime Library provides all of the common C functions such as printf, fopen, and so on.) The common versions are Multi-threaded Static and Multi-threaded DLL (selected with the /MD flag). Both have debug versions. DI-Guy only supports the Multi-threaded DLL versions of the library, or MD and MDd.

Release versions of most libraries and programs are compiled with the MD flag and have optimizations turn on. This is the case for the MD versions of the DI-Guy libraries. Debug versions of most libraries and programs are compiled with the MDd flag, have optimizations turned off, and contain debugging symbols. This is the case for the MDd versions of the DI-Guy libraries.

DI-Guy provides another option that is a hybrid between the common Release and Debug options. Even though a library or program is compiled with the MD flag, meaning it uses the release version of the runtime library, the code that is compiled can still have optimizations turned off and contain debugging symbols. This is the case for the MDn versions of the DI-Guy libraries, when MDn stands for "MD, not optimized".

This is important because, for stability reasons, all source files and libraries of a given application should be compiled with the same C Runtime Library compiler directives. In other words, if a program will be using the release/MD version of the runtime library, all of the libraries it uses should also use the release/MD version of the Runtime Library. The same is true for the debug/MDd version of the runtime library. (Sometimes MD and MDd versions can co-exist in the same program, but this can sometimes lead to subtle memory corruption bugs.)

Not all third-party libraries are provided with an MDd version, however. In this case DI-Guy provides its MDn version which has been compiled with the /MD flag, but is not optimized and contains debugging symbols so that the code can be usefully viewed in a debugging session.

9.1.2 Lua Script Modules

Refer to the ./diguy_ogl/simple_playback example for an example of using the Lua scripting module.

9.1.3 Expressive Faces Module for OpenGL

Refer to the ./diguy_ogl/facefx example for an example of using the Expressive Faces module.

9.1.4 Programming Examples for Windows

Windows programming example programs and makefiles are in ./programming_examples. The easiest example program to start with is ./programming_examples/diguy_ogl/simple.

Each programming example has the code for the example, typically in a .cpp file, and a makefile for each compiler that the example can be compiled for. For example, the makefile for the Windows x86 instruction set, Visual C++ 10, MD runtime library is makefile.win_x86_vc10_md and can be compiled with nmake. A MSVC project file is also available. Similar makefiles are provided for Linux and x64 Windows.

[Home] [Top of Page] [Compiling and Linking DI-Guy on Linux >>]