Revision [14010]
This is an old revision of CompilerRunning made by CountingPine on 2008-12-12 07:33:23.
Running
Invoking the compiler after installation.
Windows
A desktop icon and start-menu links should have been created by the installer, and can be used to open the console directly into the directory where FreeBASIC was installed - C:\Program Files\FreeBASIC by default. Alternatively, using the console ("MS-DOS prompt"), navigate to the directory where FreeBASIC was installed.
At the prompt, type,
fbc
to see a list of options. To compile the "Hello, world!" example program type,
fbc examples\misc\hello.bas
and a hello.exe executable file will be created in the examples\misc directory.
Linux
If the install.sh script was successfully executed with enough priviledges, the compiler binary should have been copied /usr/local/bin/fbc, allowing any user access to the compiler from any directory.
From the prompt, type,
From the prompt, type,
fbc
to see a list of options. To compile the "Hello, world!" example program, navigate to the directory where the FreeBASIC examples were installed (/usr/local/share/freebasic), and type,
fbc examples/misc/hello.bas
and a ./hello executable file will be created in the examples/misc directory.
Linux (standalone)
If the install script install-standalone.sh was successfully executed with enough privileges, a link to the compiler binary should have been created at /usr/bin/fbc, allowing any user access to the compiler from any directory. If it was not possible to create the link, you may want to alter your PATH environmental variable to be able to invoke the compiler from any directory. Navigate to the directory where FreeBASIC was installed.
From the prompt, type,
fbc
to see a list of options. To compile the "Hello, world!" example program type,
fbc examples/misc/hello.bas
and a ./hello executable file will be created in the examples/misc directory.
DOS
Navigate to the directory where FreeBASIC was installed. For example, if FreeBASIC is installed in the directory C:\FB, type,
C:
CD FB
CD FB
Some DOSes accept "CDD C:\FB" as well. You can also add the FreeBASIC directory to your PATH environment variable (usually something like "SET PATH=C:\FB\;%PATH%") so you can invoke the compiler from any directory.
At the prompt, type,
fbc
to see a list of options. To compile the "Hello, world!" example program type,
fbc examples\misc\hello.bas
and a hello.exe executable file will be created in the examples\misc directory.
See also:
- CompilerInstalling Installing FreeBASIC
- CompilerCmdLine Compiler Command Line Options
- CompilerFAQ Compiler FAQ
Back to Table of Contents