www.digitalmars.com Home | Search | CTG | RTL | IDDE | STL
Last update Sat Apr 8 23:54:06 2006
Compiler & Tools Guide

Compiling
Compiling Code
C Implementation
C++ Implementation
Language Extensions
Mixing Languages
Assembly Language
Inline Assembler
Optimizing Code
Numerics Programming
Regular Expressions
Acrtused
Pragmas
Precompiled Headers
Predefined Macros
Warning Messages
Error Messages
Runtime Messages


Linking
Optlink
Switches
Module Definition Files
Operation and Design
Error Messages


Win32 Programming
Win32 Programming


DOS and Win16
Programming

Memory Models
16 Bit Pointer Types
and Type Modifiers

Handle Pointers
DOS
DOS 32 (DOSX)
Win16
Win16 DLLs
Win16 Prolog/Epilog


C/C++ Extensions
Contract Programming
__debug statement
__debug declaration
Dynamic Profiling
Embedding C in HTML


Tools
BCC
CHMOD
CL
COFF2OMF
COFFIMPLIB
DMC
DIFF
DIFFDIR
DUMP
DUMPOBJ
DUMPEXE
EXE2BIN
FLPYIMG
GREP
HC
IMPLIB
LIB
LIBUNRES
MAKE
MAKEDEP
ME
OBJ2ASM
PATCHOBJ
RC
RCC
SC
SHELL
SMAKE
TOUCH
UNMANGLE
WHEREIS


Porting to DMC++
Switching to DMC++
from Microsoft
from Borland
Porting Guide


RCC: Compiling Resources

RCC is the resource compiler used to compile the program's resources. RCC can generate either 16-bit or 32-bit resource files.

The Digital Mars linker actually binds the resources compiled with RCC to the executable. In contrast, Microsoft's resource compiler RC, both compiles the resources and binds them to the executable.

If building programs using the command line utilities, use either RC or RCC.

Note: RCC supports the VERSIONINFO structure in resource scripts. You can use this structure to label a version of an install program, for example.

RCC commands have the following format:

	rcc infile [-ooutfile] [-n[emumfile]]
		{-D[macro[=text]]} {-(r u v x)[-]} {-wn[-]} {-Ipath} 
		[-j[0 1 2]] {-32 [-lnnnn]} 
  • infile Source file
  • -32 Generate a 32-bit resource file.
  • -D Predefines macro DEBUG to 1.
  • -Dmacro Predefines macro macro to 1.
  • -Dmacro=text Predefines macro macro to text.
  • -Ipath Specify a search path for #included files.
  • -j[0 1 2] Specify the format for two-byte Asian characters: 0=Japanese (default), 1=Chinese, 2=Korean.
  • -lnnnn Specify the default language ID for Unicode conversions. nnnn is a hexadecimal number of the form 0xnnnn, nnnnh, or nnnn. Valid only if -32 is also specified.
  • -n Generate enum output file.
  • -nenumfile Generate enum output file enumfile.
  • -ooutfile Specify an output file name.
  • -r[-] For compatibility with Microsoft's RC resource compiler; this switch is ignored.
  • -u[-] Disable [Enable] predefined macros.
  • -v[-] Verbose [Silent] compilation mode.
  • -wn Enable warning n.
  • -w-n Disable warning n.
  • -x[-] Turn off [on] limit on maximum number of errors.
RCC accepts the following #pragma directives:
  • #pragma res32 Generate a 32-bit resource file. This directive takes precedence over any conflicting command line switches. RCC must parse the pragma prior to parsing any resource type information; otherwise it generates an error if it encounters 16-bit resources, and ignores the directive otherwise.
  • #pragma res16 Generate a 16-bit resource file. This directive takes precedence over any conflicting command line switches. RCC must parse the pragma prior to parsing any resource type information; otherwise it generates an error if it encounters 16-bit resources, and ignores the directive otherwise.
  • #pragma once Parse the resource file where the directive appears only once, regardless of the number of times it is referenced. The compiler also supports this directive for #include'd files.
RCC defines the following predefined macros:
  • __INTSIZE Set to 2 when generating a 16-bit resource file, or 4 when generating a 32-bit resource file.
  • __NT__ For compatibility with the compiler; defined when generating 32-bit resources.
  • __RCC__ Expands to the current version number for RCC.
  • RC_INVOKED Defined as 1.