Using the CodeWright(TM) Editor

You can use the Codewright programmers' editor with any Byte Craft C compiler. However, some special configuration techniques are required during setup. The commands on this page use the minimum number of command line options necessary to compile the current source file, and create an error file with the same basename so that Codewright can help you locate and fix errors. You can add any other options you require to the compiler commands.

These instructions apply to Codewright version 6.

  1. Select Libraries on the Customize submenu of the Tools menu.

  2. Make sure Error Parsers is checked and click OK.

  3. Select Properties from the Project menu.

  4. Click on the name of your project in the list on the left.

  5. Click on the Tools tab.

  6. Select Compile from the Category list and .c from the File Type list and make sure the Redirect output checkbox is unchecked in the Command Options.

  7. Click the New button to the right of the Compiler Name and type the name of the compiler (eg: Byte Craft CDS).

  8. In the Compile edit box, type the full path to the compiler executable and the compile command line. For example:

    c:\bcl\bcl.exe %b%e +e

    Codewright replaces %b%e with the basename and extension of the current workfile. This command runs the BCL compiler and creates an error file with the same basename as the workfile. If c:\bcl\bcl.exe is not the path to your Byte Craft compiler, substitute the correct path to the compiler .exe file. You can also add any other compiler command line options that you require, but you must include the +e to create an error file.

  9. In the Debug Compile edit box, type

    c:\bcl\bcl.exe %b%e +e -ddebug

    The -ddebug command line option defines an identifier used for conditional compilation. It is the equivalent of putting #define debug in your source file. Codewright gives you to ability to use this compile command for debugging, and the Compile command you set in the step above for production code. The defined identifier can be anything; debug is used as an example.

  10. Select the Errors tab.

  11. Type %b.err in the Error Filename edit box.

  12. In the Error Parser 1 edit box, select _ByteCraftCErrorInfo.

  13. Click OK to save your settings.

Codewright features C syntax coloring, version control, and debugging environments. Codewright is a trademark of Premia Corporation.