Using Tools: 6 Goc

Up: GEOS SDK TechDocs | Up | Prev: 5 Glue | Next: 7 Grev

Goc is the GEOS C preprocessor, which will turn your .goc file into something a regular C compiler can understand. It will traverse the .goc file, detect Goc keywords (e.g. @class, @object), turn these keywords into appropriate pieces of code, and write the resulting file out to a .c file. Note that Goc acts as a simple filter, and will only make changes where it detects Goc constructs; it won't touch your regular C code at all.

Under normal circumstances, you will not invoke Goc directly. Instead, pmake will make calls to Goc when compiling .goc files.

If for some reason you do need to invoke Goc directly, you may wish to know about its command line arguments:

goc @file
goc [args] <file>
@ file
Command-line arguments are stored in a file--Goc will read this file and treat the contents as its arguments. If you use this option, then all the arguments must be in the file--no others may appear on the command line itself.
-
Redirect output to standard out.
-C segment
Specify segment for class structures to reside.
-D macro
Set variable macro to one (e.g. "-D__GEOS__")
-D macro = value
Set variable macro to value.
-I dir
Specify additional include directory
-I-
Turn off relative inclusion.
-L name
Specify name of library being compiled. Must match argument to @deflib Goc keyword in library's .goh file, if it has one.
-M
Help pmake generate dependency information.
-cb
Generate information for Borland compiler.
-d
Turn on all debugging information.
-dd
Output @default debugging information. (See the GOC Language chapter to find out what @default means).
-dl
Output lexical analyzer debugging information.
-dm
Output message parameter definition debugging information.
-ds
Output symbolic debugging information.
-du
Output Goc-specific debugging information.
-dy
Output parser debugging information.
-l
Do localization work.
-o file
Specify name of output file.
-p
For Geoworks use only.
-X
Ignore @optimize flags

Up: GEOS SDK TechDocs | Up | Prev: 5 Glue | Next: 7 Grev