Kernel SDK Developer's Guide > Getting Started Using Kernel SDK > Building Applications
Building Applications

This section describes the key steps of building your applications developed with the Kernel API. To learn how to download Kernel libraries for a specific platform, see Downloading Kernel.

For the list of supported platforms and compilers, see the Supported Platforms topic.

It is strongly recommended to compile your application code with compilers mentioned above to avoid possible link errors.

Header files

The header files required to build your application are located in the Kernel\Include directory of a release package.

The path to this directory and its subdirectories must be provided to the compiler when building a client application.

Static and shared libraries

ODA Kernel platform is delivered as a set of static libraries on all supported platforms and as shared libraries on some platforms. Below are the mandatory steps to build the application using either of the configurations.

Dynamic configuration

To compile a client application that uses Kernel shared libraries, the following steps are required:

  • The path to the directory that contains the shared libraries must be provided.
  • Library files (*.lib) for all shared libraries must be linked.
  • If the application intends on using ODA extension modules, all .tx (.txv) files must also be placed along with other library files.
  • Dynamic configuration projects must contain a _TOOLKIT_IN_DLL_ symbol definition.

Static configuration

To build an application that uses the static Kernel configuration:

  • The path to the directory that contains the static libraries must be provided.
  • Library files (*.lib) for all libraries must be linked.
  • If the application intends on using ODA extension modules:
    • Module static library files must be also placed along with other libraries.
    • All module libraries must be linked.
    • The procedure of loading static modules must be added to the application's code. For details, see Loading Additional Modules.

Platform-specific symbols and compiler settings

Client programs must define one or more platform-specific preprocessor symbols when building client applications (for some platforms these preprocessor symbols are defined automatically by the compiler). The effect of these symbols can be seen in the OdPlatform.h header file. Client programs must also use compiler settings that are compatible with the specific version of the ODA software that is being used.

For example, a Windows client application project must use the same RTL setting that was used to build the specified version of the Kernel libraries for Windows:

  • DLL — dynamic library
  • MD — static library with multithread- and DLL-specific version of run-time library
  • MT — static library with multithread, static version of run-time library

For more about RTL settings, see the MSDN Library.

Example projects and configured files with all required settings can also be found in the release packages.

Link order for UNIX-based platforms

The link order is essential when linking libraries for UNIX-based platforms.

The following list represents an example of the link order for the set of the Kernel libraries:

  1. TD_BrepRenderer.lib
  2. TD_Br.lib
  3. TD_AcisBuilder.lib
  4. TD_DbRoot.lib
  5. TD_Gs.lib
  6. TD_Gi.lib
  7. TD_SpatialIndex.lib
  8. TD_Ge.lib
  9. FreeType.lib
  10. RasterProcessor.lib
  11. RxRasterServices.lib
  12. FreeImage.lib
  13. TD_Root.lib
  14. zlib.lib
  15. sisl.lib
  16. TD_Alloc.lib

Examples of link lists can be found in the configured CMakeLists.txt files for Kernel example applications from the release packages.

See Also

Compiling Kernel Sample Applications

Copyright © 2002 – 2020. Open Design Alliance. All rights reserved.