Drawings SDK Developer Guide > Getting Started with Drawings SDK > Using Sample Applications > Compiling Drawings Sample Applications > Compiling Sample Applications on Windows Platforms
Compiling Sample Applications on Windows Platforms

Building samples with MS Visual Studio

For building samples from the release archive of a specific configuration, the proper version of Visual Studio must be used.

To build sample application code, follow the steps below:

  1. Unpack the downloaded archive. After unpacking, the root folder will contain the following subfolders in addition to TD and TG source code folders:
    • exe — Contains .exe, .dll, .tx files.
    • lib — Contains .lib files.
    • Platforms — Contains solutions, projects, intermediate build files.

    These folders have subfolders for different configurations. For example, if you unpack Drawings_vc10dll.zip, there will be vc10dll subfolders. If you unpack Drawings_vc10dlldbg.zip, vc10dlldbg subfolders will appear.

  2. Go to Platforms\<configuration name> and open the solution for samples.
  3. Build the solution.
  4. Find compiled .exe files in the exe\<configuration name> folder.

For example, to build the samples for MSVC 2010, DLL configuration:

  1. Unpack Drawings_vc10dll.zip.
  2. Open the solution Platforms\vc10dll\Drawings_vc10dll_ex.sln.
  3. Build the solution.
  4. Executables are in the exe\vc10dll folder.

Notes:

  • Some samples use the DirectX rendering device, the building of which requires DirectX 9 SDK. It can be downloaded from Microsoft download center. After downloading and installing this SDK, a DXSDK_DIR environment variable needs to be created and set to the full path of the dxsdk-9.0 directory.
  • Some projects in the solution depend on others. If you open an individual project (.vcproj) outside of the solution (.sln), its build may fail.

Using multiple configurations

It's acceptable to unpack different Windows archives into the same folder. This is convenient, for example, to build Release and Debug configurations using the same sources or even to have dynamically and statically linked configurations. Unpacking other archives to the same folder will cause warnings because some files are duplicated in both archives. This is okay; duplicate files are the same.

Note: Always use empty folders for upgrading Drawings SDK versions. Mixing files from different Drawings SDK versions may cause problems.

Building samples with Borland Builder 2010

For building sample applications, the CMake tool is provided.

To build sample application code with Borland Builder 2010, follow the steps below:

  1. Unpack the downloaded archive of the specific configuration (bb2010wm, bb2010wmdbg, bb2010wr, or bb2010wrdbg).
  2. Run the configure.bat file from the root folder.
  3. Be sure the Platforms folder is created in the root folder.
  4. To build all the samples, run 'make' in the root folder. For any particular example, go to the sample source code folder under Platforms where makefile is placed, e.g. Platforms\bb2010wm\Drawing\Examples\OdReadEx\ and run 'make' there. Or go to the \Platforms folder and run make <ExampleName>, for example:
    
    make OdCopyEx
    
  5. Find compiled .exe files in the exe\<configuration> folder and .lib files in the lib\<target> folder.

See also

Downloading Drawings SDK

Building Applications

Compiling Drawings SDK Sample Applications

Compiling Sample Applications on Non-Windows Platforms

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