WebFortran has a limited set of options to pass to the compiler. While our backend uses a standard compiler, only certain options are available from WebFortran.

Options Controlling Your WebFortran Account


Connect this instance of the WebFortran Command Line Interface to your WebFortran account. In order for this compiler to function, the user must first login to their account. Once completed, the compiler will work like any other native compiler, and the user will not have to perform this step again.


Disconnect this instance of the WebFortran Command Line Interface from your WebFortran account. This feature will reset the interface such that logging in again will work correctly, erasing any previous sessions.

Options Controlling Compiler Output


Compile the file only, but do not perform the linking step. When included, the compiler will return an object file for the requested platform/architecture. If the Fortran source code included any module statements, intermediate module interface files will also be generated.

-o <filename>

Write the compiler output the specified filename. By default, the compiler will write the output to an object file or executable with the same base name as the first input file, but with the appropriate extension. This option overrides the behavior, writing to the filename argument instead.

Options Controlling Search Paths


Use the specified path to both search for and output module interface files generated by the compiler. This option provides the same functionality as the -I<path> option, but it also instructs the compiler to store any generated module interface files in the specified <path>.


Add the specified path to the list of directories searched for needed module interface files and files referenced by Fortran's INCLUDE statement. When multiple paths are specified by this option or the -J<path> option, they are searched in order of their appearance on the command line. Currently, WebFortran does not support using the C preprocessor; preprocessor directives, notably #include will generate an error.

Options Controlling Code Generation


Enable the specified level of optimizations. The value of n can range from 0, or no optimizations, to 3, or maximum optimizations. Because level 3 optimizations can introduce unsafe math operations, generally optimization level 2 is utilized for performance.


Enable the generation of debugging information. The resulting object or executable will include information about variables, procedures, and source code to allow the use of a debugger, such as the GNU Debugger or Simply Fortran's built-in debugger.

--sys <architecture:os>

Compile for the specified architecture and operating system combination. The WebFortran compiler supports a selection of target systems. By default, the compiler generate code for the native system upon which it is running, if possible. For a list of supported systems, run the command webfortran --help.

Options Controlling the Fortran Dialect


Enable support for legacy Fortran standards or features. This flag generally instructs the compiler to allow pre-Fortran-90 features to be used, some of which have been deprecated or removed entirely in recent standards. While usually unnecessary, this flag may eliminate some issues encountered with older code.

Options Controlling Libraries and Linking


Add the specified path to the list of directories for which to search for library files. The current directory is already searched by default. On Linux hosts when cross-compiling is not being employed, the directories /usr/local/lib and /usr/lib are also searched by default.

-l<library name>

Link to the specified library. The compiler will search the list of search directories specified by the -L<path> flag as well as the current directory and, on Linux hosts using native compiling only, /usr/local/lib and /usr/lib. The compiler assumes the library file will be named exactly lib<library name>.a when searching for the file.


Link with both BLAS and LAPACK libraries, common in number-crunching Fortran codes. This option will cause the compiler to link to hosted, pre-built BLAS and LAPACK distributions. On Windows, the option uses a highly optimized version of OpenBLAS. On all other platforms, the reference LAPACK and BLAS libraries are used.

Options for Requesting Assistance


Display help information on the command line. This option will present a summary of options available and the list of currently supported architectures.


Opens the WebFortran Command Line Interface home page in the system's default web browser.