QFCC(1)

NAME
qfcc - The QuakeForge Code Compiler

SYNOPSIS
qfcc [options]

DESCRIPTION
qfcc compiles GameC source into a form that the QuakeForge server can understand.

OPTIONS
qfcc takes the following arguments:

-s, --source DIR
    look for progs.src in DIR instead of the current directory.

-q, --quiet
    Inhibit some of qfcc's normal output.

-v, --verbose
    Display more output than usual.

--code OPTION,...
    Set code generation options. See CODE GENERATION OPTIONS for details.

--warn OPTION,...
    Set warning options. See WARNING OPTIONS for details.

-g, --debug
    Synonym for --code debug.

-h, --help
    Show summary of options.

-V, --version
    Show the version of qfcc.

-D, --define SYMBOL[=VAL],...
    Define symbols for the preprocessor, if it is in use.

-I, --include DIR,...
    Add DIR to the list of directories for the preprocessor to search when looking for include files.

-U, --undefine SYMBOL,...
    Undefine preprocessor symbols, if the preprocessor is in use.

CODE GENERATION OPTIONS
Code generation options are processed in the order of their appearance on the command line. Unsupported options are ignored. The following options are supported by qfcc's --code argument:

cow Allow assignment to initialized globals. In QuakeC, a global that has been initialized to a value is not a variable, but a named constant. However, qcc never really enforced this. The cow option allows qfcc to gracefully cope with QuakeC source that assigns values to initialized globals in this manner. (also known as "copy on write" — never mind the bovine connotations)

debug
    Generate debug code for QuakeForge engines. The QuakeForge engine has the ability to load line number info and other debugging information for use in diagnosing progs crashes. This option tells qfcc to generate this information. It is written to a secondary file with the extension "sym" — if your output file is "progs.dat", the symbol file will be "progs.sym".

v6only
    Restrict the compiler to only version 6 progs (original Quake/QuakeWorld) features. This means that the compiled data file should be able to run on older servers, as long as you have not used any QuakeForge-specific built-in functions. Also disables some of the compiler's features (like integers and string manipulation support).

WARNING OPTIONS
Warning options are processed in the order of their appearance on the command line. Unsupported options are ignored. The following options are supported by qfcc's --warn argument:

cow Emit a warning when the source assigns a value to a named constant. See the description of the cow code option above for a description of what this means.

undef-function
    Emit a warning when a function is called, but has not yet been defined.

uninited-var
    Emit a warning when a variable is read from that has not been initalized to a value.

vararg-integer
    Emit a warning when a function that takes a variable number of arguments is passed a constant of an integer type.

error
    Promote warnings to errors.

Any of the above can be prefixed with no- to negate its meaning. There are also two special options:

all Turns on all warning options except error.

none
    Turns off all warning options except error.

FAQ

qfcc is singing a bad 80s rap song to me. What's going on?
    "ice ice baby" is QuakeForge-speak for "Internal Compiler Error". It usually means there's a bug in qfcc, so please report it to the team.

qfcc is mooing at me. What's wrong with you people?
    The compiler doesn't like being treated like a slab of beef. Seriously, the code you are trying to compile is using constants as if they weren't. Normally, qfcc would just stop and tell the code to sit in the corner for a while, but you told it not to do that by passing the cow option to --code, so it has its revenge by mooing out a warning. Or something like that. To disable the warning, pass no-cow to --warn.

FILES
progs.src

SEE ALSO
quakeforge(1)

AUTHORS
The original qcc program was written by Id Software, Inc. The members of the QuakeForge Project have modified it to work with extensions to the QuakeC language. To minimize confusion, the name of the language compiled by qfcc is called GameC.