What is the proper way to override a DC 9.62 Library file without modifying the original?

I want to make changes to rs232.lib for a specific project, but I don’t want to change the original one in my global /lib/ folder.

Is there a way, on a per project basis, to use the custom rs232.lib in my project folder instead of the global one?

I already tried putting a copy in my project /lib/ folder (which is where my custom .dir points to), but DC 9.62 complains that ALL library files must have unique file names even if they reside in different folders.

You can copy the lib to a local folder and rename it. Then do #use “newname” e.g.

Copy rs232.lib to local my_rs232.lib and change #use “rs232.lib” to #use “my_rs232.lib”

You have to be careful if the lib is #used by other DC libs as there will be function and data name clashes if both libs end up being included but you can get around this by judicious renaming if it does happen.


You could copy the whole global /lib folder to a local folder for just that project, and then replace the rs232.lib with the one you’ve written. Then your global /lib is intact (and unused for this project) and you don’t have to rename anything. Be sure to point to the new copy of the /lib folder by setting the user defined LIB.DIR to point to your new local /lib folder. Here’s some snippets from a document I just wrote (also contains instructions for our internally generated source.)

Rabbit Source Code Structure

The following directory structures, project settings, and file contents are used to support building KA Rabbit programs.

Dynamic C Libraries

  1. The libraries and include files are initially installed when Dynamic C 10.72 is installed (explained above in “Installing Rabbit Development Tools”), in the following directories:

  2. Copy the above directories to the following locations, as most everything in C:\KairosRabbit\ is suitable for placing under source control:

  3. Copy any changed files approved for use by Kairos Autonomi to these same corresponding directories, replacing any corresponding files from the initial installation.

All changes to these files will take place in the C:\KairosRabbit\DynamicC_10.72_Libs\ directory, which is under source control. The “Dynamic C Project and Files Setup” below steps explain how to accommodate this relocation.

Kairos Autonomi Rabbit Source Code

Below we specify “Troy” as an arbitrary identifier for the main working directory for a developer. Initially this identifier was used to denote the code that provided the system baseline. Substitute a desired meaningful directory name as appropriate.

These programs and libraries are the source code for Kairos Autonomi Rabbit projects:

Changes to these files take place in the C:\KairosRabbit\Troy directory, which is under source control.

Dynamic C Project and Files Setup

To set up the Dynamic C IDE to locate the Dynamic C libraries and include files, as well as the Kairos Autonomi source code, the following settings must be made:

  1. Using a text editor, create the following User Defined Lib Directory File: C:\KairosRabbit\Troy\RCM6600W_LIB.DIR Set its contents to the following:

  2. From the desktop, double-click on the icon Dynamic C 10.72.

  3. Open the source project (in this example C:\KairosRabbit\Troy\SafetyDirect.dcp): File / Project / Open…

  4. Set Project Options as follows: Options / Project Options
    • Compiler/Advanced/User Defined BIOS File:
    o C:\KairosRabbit\DynamicC_10.72_Libs\Bios\RabbitBios.c
    • Compiler/Advanced/User Defined Lib Directory File:
    o C:\KairosRabbit\Troy\RCM6600W_LIB.DIR
    • Project Options/Defines:
    • Project Options/Targetless/Board Selection:
    o 162MHz, RCM6600W, 1M+32K RAM, 1M serial program flash
    • Project Options/Targetless/Board Selection/CPU:
    o Rabbit 6000 revision FZD0AA064AA
    • Project Options/Include Path:
    o C:\KairosRabbit\DynamicC_10.72_Libs\include
    o C:\KairosRabbit\Stephen\include

  5. Save Project Options as follows: Project Options / OK

  6. Save Project settings as follows: File / Project / Save

Thank you for taking the time to answer. I know it has been a while. I decided to create my own rs232.lib stub file in the local project directory that just has a #use of my modified copy of rs232.lib. I renamed the stock rs232.lib in the ‘common’ library to ‘origonal_rs232.lib’. This seemed to work the best for me at this time.

Thank you for your input. Please see my commment on the previous reply. If I revisit this project, I may just move the entire ‘common’ library folder to a local project one as you suggest.