Never Define TOOLKIT in an APDFL Application
Estimated Reading Time: 1 MinutesWhen reviewing the APDFL Adobe C/C++ headers, you may see a preprocessor symbol named TOOLKIT. This symbol is part of the headers’ internal build configuration. It is not an application setting.
The Rule for Application Code
Never define TOOLKIT in an APDFL application.
Do not add it to source code:
#define TOOLKIT
Do not add it to compiler or build-system options:
-DTOOLKIT
The APDFL headers manage this internal symbol when needed. Defining it manually can select the wrong conditional-compilation path, hide missing project settings, or create a mismatch between the headers and libraries used by the application.
Supported Project Configuration
For the traditional Adobe C/C++ interface, use the definitions supplied with the APDFL samples. An HFT-based project generally uses:
PRODUCT="HFTLibrary.h"
The project must also use the platform definitions appropriate for its target. For example, a Windows project normally includes WIN_ENV, WIN32, and WIN_PLATFORM. The Getting Started with APDFL in Qt Creator article provides a working example.
Resolving Build Problems
If a project appears to compile only after defining TOOLKIT, the project is not configured correctly. Remove that definition and compare the project’s preprocessor settings, include order, initialization sources, and linked libraries with a working sample from the same APDFL release.
TOOLKIT is not relevant to applications using the APDFL .NET, Java, or Modern C++ interfaces. See What is the Modern C++ SDK? for information about the newer C++ interface.