Show: Object Pascal C++
Display Preferences

C++ Linker

From Appmethod Topics
Jump to: navigation, search

Go Up to Project Options Dialog Box


Project > Options > C++ Linker

Use this dialog box to set C++ linker options.

Options Description

Target, Apply, Save

See Target Options.

Common items

See Common Items on Project Options Pages.


Linking Options

Linking options Description Linker support
ilink32 ilink64 xlink ld (iOS) ld (Android)

Disable incremental link

Suppresses the generation of linker state files, disabling incremental linking. If you use the Disable incremental link option, subsequent links take just as long as the first one.
Default = False

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Display time spent on link

Include in the linker output the amount of time required to complete the linking.
Default = False

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Full debug information

Includes information in the output file needed to debug your application with the Appmethod C++ integrated debugger:


Default = False

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Generate .drc file

ILINK32 generates Object Pascal-compatible .RC files (.drc files). The .drc file has the same name as the executable file and is emitted to the same directory as the executable file.
Default = False

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Generate .map symbols file

Generates a mapfile in .\OutputFolder\ProjectName.map.
By default, the linker names the map file with the base name of the program and the extension .map
Default = True

For desktop platforms, you set the Map file options on the C++ Linker Output page.

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Generate import library

Generates an import library file, a small static library that describes the exports of either a package or a .dll so that an application can link against it.

This file is used when linking dynamic libraries. Without an import library you cannot use the package in C++.

The import library file extension is:

Note: This option appears only for C++ Dynamic-link library projects.

Enabled only for C++ packages.
Default = True

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Generate static package library (.lib)

Generates a statically linkable package library.

Building a C++ static package library (.lib) requires a set of .objs that are different from the .objs used to build the dynamic library (.bpl).

When this option is enabled (the default setting), a build or make command produces two sets of .objs:

  • The .objs for the dynamic library (.bpl).
  • The .objs for the static library (.lib).
  • For both types of library, the TLIB Library Manager creates the actual library, in the \bpilib directory.

The .obj files for the static library (.lib) are output into a subdirectory created in your project directory, typically the \Debug\Win32\staticobjs directory. The .obj files for the dynamic library (.bpl) are output into your project directory.

When this option is disabled, a build or make command produces only the dynamic library (.bpl).

For more information, see Building Static Packages.

Enabled only for C++ packages.

Default = True

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Keep output files

Tells the linker to keep output files that would otherwise be deleted on errors. The linker has been changed to delete its output file (EXE/DLL) if there are errors in the link. The old behavior was to leave these files and not delete them.
Default = False

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Link with Dynamic RTL

Controls whether the C RTL links dynamically (or statically) with run-time library (cc3290.dll).
Default = True

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Link with the Object Pascal Runtime Library
(rtl package and cp32mt.lib/cp32mti.lib)

Ensures that the application is linked with the following:

  • The Object Pascal RTL package (rtl.lib or rtl.bpi)
  • The memmgr.lib and sysinit.obj units
  • The C++ RTL that is compatible with the Object Pascal RTL (that is, cp32*.lib).

C++ links with the Object Pascal RTL if this option is enabled, or if the project has a framework affinity. For example, FMX Forms projects, by virtue of their framework affinity, link with the Object Pascal RTL. Use this option for any C++ application that has no framework affinity and that you want to use some Object Pascal types (such as UnicodeString, Variant, and so on) or access some functionality exposed by units in the Object Pascal RTL package (such as SysUtils, Classes, IOUtils, and so on).

C++ console applications cannot handle Object Pascal exceptions unless you either enable this option or select a framework when you create the application using the New Console Application (C++) wizard.
Default = False

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Remove the temporary .lnk linker file after linking

This option removes the temporary linker file in .\OutputFolder\ProjectName.lnk.
Default = True

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Specify maximum number of errors

Sets the specified number of errors encountered (nn) before the link is aborted.
Default = 0

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Advanced Options

Advanced options Description Linker support
ilink32 ilink64 xlink ld (iOS) ld (Android)

Additional options

Enter any additional linker options you want. For options, see ILINK32, the 32-bit Incremental Linker.

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Case sensitive linking

The linker differentiates between upper and lowercase characters in public and external symbols. Normally, this option should be set, since C and C++ are both case-sensitive languages.
Default = True

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Clear state before linking

Deletes the existing incremental linker state files and then recreates these files and continues with the link. This option allows you to refresh the state files.
Default = False

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Delay load .DLLs

Specifies DLLs that are to be delay loaded. Delayed loading of DLLs is useful for DLLs that are used very infrequently by an application, but might have high startup costs. DLLs that have been delay loaded are not loaded and initialized until an entry point in the DLL is actually called. There is accompanying RTL support for delayed load DLLs that the user can hook into to handle errors on loading and to supplant the delayed load system, if so desired. See the description of the Ellipsis pop-up button in Common Items on Project Options Pages.

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Do image checksum

Calculates the checksum of the target and places the result in the target PE header. This is used for NT Kernel mode drivers and system DLLs.
Default = False

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Fast TLS

Allocate TLS (thread-local storage) from Windows instead of using the mechanism to share TLS.
Default = False

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

File alignment

Specifies page alignment for code and data within the executable file. The linker uses the file alignment value when it writes the various objects and sections (such as code and data) to the file. For example, if you use the default value of 0x200, the linker stores the section of the image on 512-byte boundaries within the executable file.

When using this option, you must specify a file alignment value that is a power of 2, with the smallest value being 16.
Default = 0x200

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Object alignment

The linker uses the object alignment value to determine the virtual addresses of the various objects and sections (such as code and data) in your application. For example, if you specify an object alignment value of 8192, the linker aligns the virtual addresses of the sections in the image on 8192-byte (0x2000) boundaries.

When using this option, you must specify an object alignment value that is a power of 2, with the smallest value being 4096 (0x1000), the default.
Default = 0x1000

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Replace resources

Add and/or replace resources without stripping away the existing resources.
Default = False

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Verbose linking

Sets the verbose option for RLINK32, and detailed information is emitted during the resource link.
Default = False

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Additionally linked libraries

Links your application against the specified list of libraries.

Specify libraries by codename.

Note: Other advanced options let you link to popular libraries such as Interbase. Use those other options instead of Additionally linked libraries when possible.
YesC++11Feature.png
YesC++11Feature.png

Link with DBX InterBase

Links with the dbExpress InterBase client library.
Default = True

YesC++11Feature.png
YesC++11Feature.png

Link with Indy

Links with the Indy libraries.
Default = True

YesC++11Feature.png
YesC++11Feature.png

Link with Interbase ToGo

Links with the dbExpress InterBase ToGo client library.
Default = True

YesC++11Feature.png
YesC++11Feature.png

Link with Midas

Links with MIDAS, the DataSnap library.
Default = True

YesC++11Feature.png
YesC++11Feature.png

Link with Regular Expressions.
Default = True

Links with the regular expressions library, the PCRE (Perl-compatible regular expressions) library adapted to C++.
See more information at http://www.pcre.org.
Default = True

YesC++11Feature.png

Link with SQLite

Links with the dbExpress SQLite client library.
Default = True

YesC++11Feature.png
YesC++11Feature.png

Link with SSL and Crypto

Links with the OpenSSL libraries.

See for example Creating an iOS App, OpenSSL Support.
Default = False

YesC++11Feature.png

Link with ZLib

Links with the ZLib compression library.
See more information at http://www.zlib.net.
Default = True

YesC++11Feature.png
YesC++11Feature.png

Minimum iOS version supported

Defines the minimum iOS version that your application supports.

See FireMonkey Platform Prerequisites, iOS Requirements.
Default = 5.1.0

YesC++11Feature.png
YesC++11Feature.png

Symbols that our runtime expects to be exported

List of symbols that must be exported because they are required at run time.

YesC++11Feature.png

Child Pages

See Also

Personal tools
In other languages