-
Notifications
You must be signed in to change notification settings - Fork 10
CommandLineOptions
./bcc [options] source-file [object-file]
Option | Description |
---|---|
-acc-err | On error, create an error file like one created by the acc compiler. |
-acc-stats | Show compilation statistics like those shown by the acc compiler. |
-h | Show help information. |
-i directory | Add a directory to search in for files. |
-I directory | |
-one-column | Start column position at 1. Default is 0. |
-tab-size size | Specify the width of the tab character. |
-strip-asserts | Do not include asserts in object file. (Asserts will not be executed at run-time.) |
-E | Do preprocessing only. |
-D name | Create a macro with the specified name. The macro will be defined as 1 . The macro will only be available during the preprocessing of the main library. |
-x language | Specify the language of the source file. The language must be one of the following:
.bcs , the language will be bcs; otherwise, acs.
|
-l library | Create a link to the specified library. This is the same as: #linklibrary "library"
|
Option | Description |
---|---|
-cache | Enable caching of libraries. Only imported libraries are cached. |
-cache-dir directory | Store cache-related files in the specified directory. If one is not specified, a system-default temporary directory will be used. |
-cache-lifetime duration |
Keep a library cached for the specified duration. The duration is measured in hours. |
-cache-print | Show the contents of the cache. |
-cache-clear | Delete all cached library files. |
SLADE supports using BCC as an ACS compiler. The following sections describe how to make SLADE use BCC.
Before we set up BCC with SLADE, we need to do a couple of things:
-
Get the latest version of BCC
Download the latest version of BCC. Create a new folder, naming it whatever you want. Then extract the contents of the ZIP file into the folder you just created.
-
Set up the zcommon.acs files
In your BCC folder, make sure the
lib\acs\
folder contains the zcommon.acs files. You can get the latest version of the zcommon.acs files here:
The following steps describe how to configure SLADE to use BCC:
- Start SLADE
- Open the SLADE Preferences window
- Open the Scripting page, then open the ACS page
- Press the Browse button, then go to your BCC folder and select the BCC executable file
- Press Apply
By default, SLADE will execute BCC in ACS mode. At the time of this writing, using the latest available version of SLADE (3.1.2 beta 4), there is no proper way to pass command-line arguments to a compiler, which is needed in order to select the BCS mode. There is a hacky way of making SLADE compile BCS code. The following steps describe the procedure:
- Make sure SLADE is closed
-
Open the SLADE configuration file
On my Windows machine, the configuration file is located at the following path, where account is my account name:
C:\Users\acount\AppData\Roaming\SLADE3\slade3.cfg
-
In the configuration file, locate the line for the
path_acc_libs
configuration parameterThe line will look similar to the following:
path_acc_libs ""
There might be data between the quotation marks. This is fine. You can proceed to the next step.
-
Add
.\" -x bcs -one-column -i \".
between the quotation marksThe line should now look like this:
path_acc_libs ".\" -x bcs -one-column -i \"."
If there is already data between the quotation marks, then go to the end of the data, add a
;
, then add the above data. The line should then look like this:path_acc_libs "some_other_data;.\" -x bcs -one-column -i \"."
Optional: if you want to pass more arguments to the compiler, add them after the
-one-column
argument. - Save and close the configuration file
- Start SLADE
- Start SLADE
- Open the SLADE Preferences window
- Open the Scripting page, then open the ACS page
- In the Include Paths section, select the entry which has the following value:
".\" -x bcs -one-column -i \"."
- Press Remove
- Press Apply
- Restart SLADE