RAD Studio (Common)
ContentsIndex
PreviousUpNext
Linking

ProjectOptionsDelphi CompilerLinking 

Use this page to set linker options for your application.

Note: Not all of the options described below are available for all types of projects.

Build Configuration options 
Description 
Build Configuration  
Displays the name of the current build configuration associated with the options on this page. There are three default build configurations: Base, Debug, and Release.  
Apply Options...  
Displays the Apply Option Set dialog box to apply the options in a named option set to the current configuration.  

 

Common items 
Description 
Value from <parent configuration or option set>  
Indicates the value in the parent build configuration or referenced option set. If you change this value here, the change will potentially affect the Base configuration (that is, if you click OK on the Project->Options dialog and subsequently build your project).  
<any item in boldface print>  
Indicates that the value of this option has been changed from the value in the parent configuration or referenced option set.  
Down Arrow Pop-Up Button  
Appears after you click an option that has specific choices available (such as True, False). Click Down Arrow to display and choose from the available choices.  

 

Linking option 
Description 
Debug information  
Generates a line-number table for each procedure that maps object-code addresses into source text line numbers. Equivalent to the {$D+} Delphi compiler directive and the -V switch for DCC32. Default = False  
EXE Description  
Enter a description of your EXE file. This field can contain a string of as many as 255 characters. The string is linked to $D and included in the executable file. It is most often used to insert copyright information into the application. Copyright information can also be included as part of the VersionInfo file. Note that this option is only applicable to DLLs and application executables but not for packages.  
Generate console application  
Causes the linker to set a flag in the application’s .exe file indicating a console mode application. Default = False  
Image base (-K)  
Specifies the preferred load address of the compiled image. This value is typically only changed when compiling DLLs. Default = 400000  
Include remote debug symbols (-VR)  
Check this if you are using remote debugging. Default = False  
Linker output  
Specifies the output types that you want from the linker. Click the down-arrow to select from the possible values:  
Generate DCUs*  
Creates the standard Delphi .dcu format files. This is the default.  
Generate C .objs  
Creates a C object file for linking with a C program (no name mangling).  
Generate C++ .objs  
Creates a C++ object file for linking with C++ (uses C++ name mangling).  
Generate C++ .objs, headers  
Includes header file information in the C++ object file.  
Generate C++ .objs, headers, namespaces  
Includes header file and C++ namespace information in the OBJ and HPP files generated.  
Generate C++ .objs, headers, namespaces, export  
Includes all symbol information in the OBJ and HPP files generated.  
Generate C++ .objs, namespaces  
Includes C++ namespace information in the OBJ files generated. This is the default for mixed Delphi and C++ projects.  
Generate C++ .objs, namespaces, export  
Includes C++ namespace and symbol information in the OBJ files generated.  
 
 
Map file  
By default, the linker generates a map file that contains general segment information including a list of segments, the program start address, and any warning or error messages produced during the link. Default = Off.
Off - Produces no map file. This is the default.
Segments - Produces a map file that includes a list of segments, the program start address, and any warning or error messages produced during the link.
Publics - Produces a map file that includes a list of segments, the program start address, any warning or error messages produced during the link, and a list of alphabetically sorted public symbols.
Detailed - Produces a map file that includes a list of segments, the program start address, any warning or error messages produced during the link, a list of alphabetically sorted public symbols, and an additional detailed segment map. The detailed segment map includes the segment address, length in bytes, segment name, group, and module information.  
Maximum stack size  
Indicates the total reserved size of the stack (only applicable to executable projects; disabled for DLLs). Memory-size settings can also be specified in your source code with the $M compiler directive. Default = 1048576  
Minimum stack size  
Indicates the initial committed size of the stack (only applicable to executable projects; disabled for DLLs). Memory-size settings can also be specified in your source code with the $M compiler directive. Default = 16384  
Set base address for relocatable images  
Controls the default load address for an application, DLL, or package. The number argument must be:
  • a 32-bit integer value that specifies the image base address.
  • be greater than or equal to $00010000, and the lower 16 bits of the argument are ignored and should be zero.
  • a multiple of 64K (that is, a hex number must have zeros as the last 4 digits); otherwise it will be rounded down to the nearest multiple, and you will receive a compiler message.
This option is equivalent to the {$IMAGEBASE} Delphi compiler directive. Default = 0  
Set extra PE header flags  
Specifies additional flags for the PE (Portable Executable) header for your application.
Sets the field or fields that you specify to the value(s) you specify. This option is equivalent to the {$SETPEFLAGS xxx} Delphi compiler directive. Default = 0  
Set extra PE header optional flags  
Sets additional header fields in the PE (Portable Executable) file optional header. For details, see the IMAGE_OPTIONAL_HEADER structure as defined in the WINNT.h file. Default = 0  
Set OS version fields in PE header as <major>.<minor>  
Specifies the operating system version that is required to run the image. Sets the MajorOperatingSystemVersion field in the PE (Portable Executable) file optional header to the value you specify as <major>. Also sets the MinorOperatingSystemVersion field to the value you specify as <minor>. For example, entering 3.2 in this field specifies the OS version as Windows NT 3.2 in the PE file optional header. The fields are defined in the WINNT.h file under IMAGE_OPTIONAL_HEADER . Default = 5.0  
Set subsystem version fields in PE header as <major>.<minor>  
Specifies the Windows subsystem that is required to run the image, for a PE (Portable Executable) file. Sets the MajorSubsystemVersion field in the PE file optional header to the value you specify as <major>. Also sets the MinorSubsystemVersion field to the value you specify as <minor>. Default = 4.0 The following values for Subsystem are defined in the WINNT.h file:
  • IMAGE_SUBSYSTEM_UNKNOWN, 0 , Unknown subsystem
  • IMAGE_SUBSYSTEM_NATIVE, 1, Used for device drivers and native Windows NT processes
  • IMAGE_SUBSYSTEM_WINDOWS_GUI, 2. Image runs in the Windows graphical user interface (GUI) subsystem
  • IMAGE_SUBSYSTEM_WINDOWS_CUI, 3, Image runs in the Windows character subsystem
  • IMAGE_SUBSYSTEM_POSIX_CUI, 7, Image runs in the Posix character subsystem
 
Set user version fields in PE header as <major>.<minor>  
Specifies the version number of your application. Sets the MajorVersion field in the PE (Portable Executable) file optional header to the value you specify as <major>. Also sets the MinorVersion field to the value you specify as <minor>. For example, entering 8.11 in this field specifies the application version as 8.11 in the PE file optional header. The fields are defined in the WINNT.h file under IMAGE_OPTIONAL_HEADER. Default = 0  

 

General item 
Description 
Default  
Saves the current settings as the default for each new project.  
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!