Drawings SDK Developer Guide > Getting Started with Drawings SDK > Building Your Application
Building Applications

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

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 Drawing\Include (for .dwg functionality) and Dgn\Include (for DGN functionality) directories 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

Drawings libraries are available as 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 Drawings SDK 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 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 Platform 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 ODA 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 ODA libraries:

  1. ModelerGeometry.lib
  2. TD_BrepRenderer.lib
  3. TD_Br.lib
  4. TD_AcisBuilder.lib
  5. TD_DynBlocks.lib
  6. RecomputeDimBlock.lib
  7. TD_Ave.lib
  8. TD_Db.lib
  9. TD_DbRoot.lib
  10. TD_Gs.lib
  11. TD_Gi.lib
  12. TD_SpatialIndex.lib
  13. TD_Ge.lib
  14. FreeType.lib
  15. RasterProcessor.lib
  16. RxRasterServices.lib
  17. FreeImage.lib
  18. TD_Root.lib
  19. zlib.lib
  20. sisl.lib
  21. TD_Alloc.lib

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

See Also

Compiling Drawings SDK Sample Applications

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