Programming Tools:prgtools

The definitions in a project file Foundation

All definitions supported in the project file are listed below. Definitions in the [PROJECT] section are valid for all targets in the project. Target sections may contain definitions that overwrite project wide definitions.

COFF_LINKER=

This optional definition can be used to define the linker to be invoked by the ProjectBuilder when OBJ_FORMAT= is set to COFF (Common Object File Format). If COFF_LINKER= is not defined in this case, the ProjectBuilder uses the linker defined with LINKER=.

COMPILE=

This indicates the name of the Xbase++ compiler. It is always XPP.

COMPILE_FLAGS=

All compiler switches to be set for compilation are defined here. Note that the compiler switches /o and /b are not allowed to be used. Note also that /i is a compatibility switch which should not be used for integrating project-level .ch files. See INCLUDE= for further information.

DEBUG=

This definition can be set to YES (debug version) or NO (non debug version). Executable files are created accordingly with or without debug information. An executable file must be created with DEBUG=YES so that it can be monitored with the debugger.

DEPENDS_ON= *)

This definition can be used to define a target name which this target depends on. More than one DEPENDS_ON= definition can be present in a section if this target depends on more then one other target in the project. The ProjectBuilder resolves the list of dependencies and automatically builds the targets in the required order. If the values specified for DEPENDS_ON= lead to a cyclic dependency or if a dependency cannot be resolved, the ProjectBuilder terminates with an error.

GUI=

If a program is to run as text mode application, GUI=NO must be set. Whenever a program performs graphic output, be it with Gra..() functions or by using Xbase Parts, GUI=YES must be defined.

INCLUDE=

Add a search path to find .CH - files to the INCLUDE path inherited by the process which calls PBUILD.EXE.

INCLUDE= is an environmental switch intended for integrating include files on the tool or framework-level. Using INCLUDE= for adding additional search directories for .ch files which belong to your project is discouraged. Instead, .ch files should be referenced explicitly in the corresponding #include directive using target-relative addressing.

INCLUDE_FROM= *)

A single target from another project can be included into a project with INCLUDE_FROM. This is done by adding a target section with an INCLUDE_FROM definition to a project. The name of the target section must match the name of a target in the project file which is referenced by INCLUDE_FROM. By default, the ProjectBuilder uses the definitions specified for the target in the referenced project file for building the target. However, these definitions can be superseded by adding definitions to the target section containing the INCLUDE_FROM definition.

The path to the other project can be specified either as a fully-qualified path, or as a path relative to the current project directory. The syntax ofINCLUDE_FROM is as follows: INCLUDE_FROM = <path>\<projectfile>[:<targetname>]

The optional specifier <targetname> can be used to explicitly specify the target name in the project referenced by INCLUDE_FROM. This allows the usage of different target names in the including and the referenced project.

Intermediate file as well as target file locations are defined by the including project.

LIB=

Add a search path to find .LIB and .OBJ files to the LIB path inherited by the process which calls PBUILD.EXE.

LINKER=

This definition indicates the name of the linker that is used to create EXE or DLL files from OBJ files. It is the linker that is shipped with the operating system-specific Xbase++ version.

LINK_FLAGS=

All linker flags which are not covered by GUI= and DEBUG= are listed in this definition. However, if the flags /PM and /DE are used here as well, they override the corresponding definitions GUI= and DEBUG=.

OBJ_DIR=

Optionally, the directory for OBJ files can be defined. The compiler creates OBJ files in this directory, and the linker searches it for these files. Only one directory can be set for each target.

The OBJ_DIR setting affects only the OBJ files listed in the section of a project file that is delimited with // $START-AUTODEPEND and // $STOP-AUTODEPEND. The ProjectBuilder completes these OBJ file names with the OBJ_DIR directory so that no path information may be specified for the files listed in the auto-dependency section. Additional OBJ files can be specified with a full qualified path outside the auto-dependency section.

INTERMEDIATE_DEBUG=

Specifies the location of the intermediate files such as OBJ and RES files for debug builds. If this definition is specified, OBJ_DIR is ignored.

INTERMEDIATE_RELEASE=

Specifies the location of the intermediate files such as OBJ and RES files for non-debug/release builds. If this definition is specified, OBJ_DIR is ignored.

OBJ_FORMAT=

Two values can be used for this definition to select the object file format: COFF (Common Object File Format) or OMF (Object Module Format). The ProjectBuilder then starts the Xbase++ compiler XPP.EXE and invokes AIMPLIB.EXE, if necessary, using the corresponding switches /coff or /omf. In addition, the linker specified with COFF_LINKER= or OMF_LINKER= is used in the build process.

OMF_LINKER=

This optional definition can be used to define the linker to be invoked by the ProjectBuilder when OBJ_FORMAT= is set to OMF (Object Module Format). If OMF_LINKER= is not defined in this case, the ProjectBuilder uses the linker defined with LINKER=.

POST_BUILD= *)

This definition can be used to execute a command after the target is built. The statement that follows the equal sign ("=") is then executed in a command shell. More than one POST_BUILD definition can be present in a section. In this case, the commands are executed sequentially, in the order they were defined. If a command returns an error, execution of the ProjectBuilder is aborted. This behavior can be overridden by specifying a hyphen character ("-") as first character behind the equal sign ("=").

POST_CLEAN= *)

This definition can be used to execute a command after the target is cleaned. The statement that follows the equal sign ("=") is then executed in a command shell. More than one POST_CLEAN definition can be present in a section. In this case, the commands are executed sequentially, in the order in which they were defined. If a command returns an error, execution of the ProjectBuilder is aborted. This behavior can be overridden by specifying a hyphen character ("-") as first character behind the equal sign ("=").

PRE_BUILD= *)

This definition can be used to execute a command before the target is built. The statement that follows the equal sign ("=") is then executed in a command shell. More than one PRE_BUILD definition can be present in a section. In this case, the commands are executed sequentially, in the order in which they were defined. If a command returns an error, execution of the ProjectBuilder is aborted. This behaviour can be overridden by specifying a hyphen character ("-") as first character behind the equal sign ("=").

PRE_CLEAN= *)

This definition can be used to execute a command before the target is cleaned. The statement that follows the equal sign ("=") is then executed in a command shell. More than one PRE_CLEAN definition can be present in a section. In this case, the commands are executed sequentially, in the order in which they were defined. If a command returns an error, execution of the ProjectBuilder is aborted. This behaviour can be overridden by specifying a hyphen character ("-") as first character behind the equal sign ("=").

RC_COMPILE=

This definition contains the name of the resource compiler as it is shipped with Xbase++. Normally, additional resources are used for GUI applications only.

There are additional notes at the end of this section for the OS/2 platform.

RC_FLAGS=

The flags for the resource compiler are set with this definition.

RUNPARAMETERS=

The parameters which are passed to your application when it is run or debugged in the Xbase++ Workbench are set with this definition. The option has no effect when the project is built or cleaned. The value following the equal sign ("=") corresponds to the set of options or parameters that you would specify when running your application from the command line. It is normally specified using the Run -> ParametersXbase++ Workbench.

<SECTION>

All entries in the [PROJECT] section defined without equal signs are used as a reference to subsequent user-defined sections which are to be analyzed by the ProjectBuilder. Normally, only one additional section (the root section) is referenced. There must be at least one user-defined section.

TARGET_DIR=

The TARGET_DIR definition in the [PROJECT] section specifies a single folder where all targets of the project are deployed to.

By default, a binary target is created in the folder of the project file (XPJ) or in a target specific sub-folder. To isolate dbf tables, configuration files or other auxiliary data from the build/source directories and manage a dedicated deployment location, TARGET_DIR shall be used.

Using TARGET_DIR in a target section defines the deployment location for that target only and supersedes a potential definiton at the project level.

*) These definitions are target-specific. They cannot be used in the [PROJECT] section.

If definitions are passed to PBUILD.EXE on the command line using the /d switch, all existing definitions with the same name are ignored.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.