#include Not Supported?

I’m new to dynamic C have have the task of converting an existing project to it. First thing I noticed in the non-ANSI compliant list that shows no support for the #include directive.

Form my understanding of the docs, a typical project is made with one big main.c file. I’m trying to make this more manageable, and the only way I can see to do this is convert all the source files in my project into separate .LIBs. Except- my project is hardware-dependent and I would never be re-using the code anyway, so the whole concept of creating libraries and modules on one time use code doesn’t make sense. Am I missing something or is there an easier way to convert a normal multi-C source file project to work with this compiler?

^bump^

Hmm… slow board. Does Rabbit tech support visit here regularly?

You need to convert your old #include files to #use .lib files. It’s a pain but that’s the way Dynamic C works.

I to was taken aback by the lack of includes and multiple files. I solved the issue with a simple DOS batch script. The script concatennates all the files in the order I want into a temporary file that I then compile.

I had tried to use my Visual C preprocessor to do the expansion, but it barfed on DynamicC’s unstandard # commands (line #use). I was going to try something like M4 but decided the batch file was the way to go.

Here is part of my batch file:

@ECHO OFF
@del c:\chariot\chariot.c
@copy .\chariot.h c:\chariot\chariot.c
@copy c:\chariot\chariot.c + . ypes.h c:\chariot\chariot.c

@copy c:\chariot\chariot.c + .\ctl.h c:\chariot\chariot.c
@copy c:\chariot\chariot.c + .\main.c c:\chariot\chariot.c

@copy c:\chariot\chariot.c + .\ctl.c c:\chariot\chariot.c

ECHO. C:\chariot\chariot.c generated

Good solution. Thanks.

I just don’t know why manufacturers take such liberties in the C language. It just makes it harder to maintain, port, etc. especially when someone new comes on board to maintain code and has to learn another version of C.