Main Website Main Website
Documents Root Documents Root
Search

History

Compiler Switches
.

The command line and ‘on demand’ compilations use the same code (gothamdll.dll) and so they should produce the same results. They are slightly different in some respects. For example, if there is a compile time error, the on-demand compiler has to show it to you in the browser. The command-line compiler can show you in the console window. This is an important distinction because the command-line compiler can show you the error and produce results. You may ask why on earth the command line compiler would produce a DLL even if there was an error. The reason for this is that you the programmer can look at the error and decide whether it matters. For example, I have a set of source code that has some undefined variables. Gotham produces compilation errors for these variables but it also know it can continue and silently declare them. If you have code that produces compiler errors you cannot view the results of the code through demand-compilation.

The command line for Gotham is

 gotham sourcefile [switches]

The switches are as follows

/outputdir destination (/od)

Sends the output of compilation (i.e. the assembly) to the directory mentioned. Without an output directory setting the compiled code will go into .\bin

/sourcedir source (/sd)

Looks in the directory mentioned for the source file specified elsewhere on the command line.

/nocode

Do not generate code

/iis

Produce an assembly that can be loaded into IIS (default option)

/console

Produce an executable that can be run as a normal program

/pause

Pause after completion

/list

Produce a compilation listing. The file will be in the same place as the output file and have the same name with ‘.list’ appended.

/nolist

Do not produce a compilation listing (default option)

/implicit

The default compilation mode is to turn on ‘option explicit’. /implicit turns off ‘option explicit’ although the command in a source file will override the switch.

/nostatic_html

An ASP file is made of ASP commands and static HTML. With this switch the static HTML is not output. This is turned on by default for Global.asa

You can set default compilation switches by including a file named ‘GothamCompileOptions’ with the source files. It should contain one argument per line. For example:

 /od
 C:\inetpub\wwwroot\bin
 /implicit
Recent Topics
Copyright Silverfrost Limited, 2007. All Rights Reserved.