Selecting Resource Compiler Options

You select resource compiler options either by turning check box items on or off or by typing them into the Custom Options or Defines edit fields. If a conflict occurs between an option selected by a check box and one specified in the Custom Options field, the one in the Custom Options field takes precedence.

The check boxes let you control three of the resource compiler's commonly used options:

Search Include Directories

Searches the directories in the Directories dialog box when looking for include files or resource files. (Same as turning off /X below.)

Windows Protect-Mode Only

Creates an application that runs only with Windows in protected (standard or 386 enhanced) mode. Attempting to run the application in real mode causes Windows to display an error message. (Same as /T below.)

Disable Load Optimization

Tells the compiler not to arrange preload information into contiguous segments. (Same as /K below.)

You can also specify one or more options in the Custom Options edit field (the Defines edit field is a variation on one of the options):

/D

Defines a symbol for the preprocessor that you can test with the #ifdef directive. This option is the same as putting the symbol name in the Defines edit box.

/E

Changes the default location of global memory from below the EMS bank line to above the EMS bank line for a dynamic-link library.

/I

Searches the specified directory before searching the directories specified by the INCLUDE environment variable.

/K

Disables the load-optimization feature of the Resource Compiler. If this option is not specified, the compiler arranges segments and resources in the executable file so that all preloaded information is contiguous. This feature allows Windows to load the application much more quickly. If you do not specify the /K option, all data segments, nondiscardable code segments, and the entry-point code segment will be preloaded, unless any segment and its relocation information exceed 64K. If the PRELOAD attribute is not assigned to these segments in the module-definition (.DEF) file when you link your application, the compiler will add the preload attribute and display a warning. Resources and segments will have the same segment alignment. This alignment should be as small as possible to prevent the final executable file from growing unnecessarily large. You can set the alignment using the LINK /A[[LIGNMENT]] option.

/L[[IM32]]

Tells Windows that the application uses expanded memory directly, according to the Lotus-Intel-Microsoft (LIM) Expanded Memory Specification (EMS), version 3.2.

/M[[ULTINST]]

Assigns each instance of the application task to a distinct EMS bank when Windows is running with the EMS 4.0 memory configuration. (By default, all instances of a task share the same EMS bank.)

/P

Creates a private DLL that is called by only one application. This allows Windows to use memory more efficiently, since only one application (or multiple instances of the same application) calls the DLL. For example, in the large-frame EMS memory model, the DLL is loaded above the EMS bank line, freeing memory below the bank line.

/T

Creates an application that runs only with Windows in protected (standard or 386 enhanced) mode. If the user attempts to run the application in real mode, Windows will display a message that the application cannot run in real mode. For information on this option, see Chapter 9, “The Graphical Development Environment Linker.”

/X

Prevents the Resource Compiler from searching the directories specified in the Directories dialog box for include files or resource files.

Options are not case-sensitive; for example, /r and /R are equivalent. Also, you can combine single-letter options if they do not require any additional parameters. For example, including the options:

/X /E /K

is equivalent to:

/XEK

For more information and examples of the options, see online help.