Link_Option #pragmas

Top  Previous  Next

#pragmas with the class name link_option are used to specify linker options. These #pragmas may only occur in project files.

The following link_option #pragmas are available:

 

#pragma link_option(case => on | off )

#pragma link_option(decode => on | off )

#pragma link_option(link=> <string>)

#pragma link_option(map => on | off)

#pragma link_option(overlay => on | off )

#pragma link_option(pack => on | off )

#pragma link_option(shift => num)

#pragma link_option(share_const => on | off)

#pragma link_option(icon => iconname)

 

A pragma can be used in the Project language, C++ code, Modula-2 code, or Clarion code. Some only work in certain places. A ‘P’ to the right of the pragma indicates it can be used in the Project language, a ‘C’ indicates it can be used in C++ code, a ‘M’ indicates it can be used in Modula-2 code, and a ‘W’ indicates that it can be used in Clarion code (CLW files).

 

#pragma link_option(map => on | off)   p

Controls whether a map file is generated with information about segment sizes and publics etc. The default is to create a map file.

 

#pragma link_option(case => on | off )   p

This #pragma controls whether the linker treats upper/lower case as significant when linking. The default is case=>off.

 

#pragma link_option(pack => on | off )   p

This #pragma controls whether segments are packed together. The default is pack=>on.

 

#pragma link_option(decode => on | off )   p

This indicates whether the linker should produce decoded names in the MAP file, as well as their public symbols. The option is set to on if any C source files are included in a project, otherwise off.

 

#pragma link_option(shift => num)    p

This specifies the segment alignment shift count for new-format executables. The default is 4, indicating that segments are aligned on 16-byte boundaries.

 

#pragma link_option(link => <string> )   p

This specifies the project system command to execute on #dolink.

 

#pragma link_option(share_const=> on | off)  p

This pragma controls whether the 16-bit linker commons-up identical constants. The default is on, making the exe file smaller, but C programmers may want to turn it off if they are relying on constants having different addresses.

 

#pragma link_option(icon => iconname)   p

This pragma specifies the name of the application icon file (icon => MyIcon.ico).