Library Error missing EndHeader

Hi,

I am trying to add a function to a working library. When I try to add the function I get a compiler error about the Module is missing an End Header. I know I must be missing something obvious but I can’t see it (please see attached). This was a working library so I know the main() is calling it correctly. I am wondering if it is my use of a structure?

Thanks

s

Hi,

I will answer my own question in case anyone has a similar issue in the future

I specified the the BeginHeader comment header incorrectly

I specified it as if were a function prototype. It should be just the function name.

/*** BeginHeader ADC_Convert /
struct ADC_Result ADC_Convert(void);
/
** EndHeader */

I saw it as soon as I looked at it this morning. It was a long day yesterday!

Regards

1 Like

I’m glad you found a solution. I’d advise against modifying the Dynamic C libraries whenever possible. If you’re adding new functions, consider including them in your own libraries. Otherwise you’ll need to track the Dynamic C libraries in your version control system along with your project, and those changes will affect other programs you’re writing. This was more of an issue when Dynamic C was actively under development with frequent library updates and you’d need to merge your changes back into the updated Lib directory.

If you decide to track your Dynamic C changes, take a look at Digi’s GitHub repository for Dynamic C 10. It includes instructions on how to clone the repository into your current installation, switch to the commit associated with that release (likely 10.72E), and then be able to see what you’ve changed from the original install. You can then create your own branch to track your changes. If you plan to share those changes with others, you’ll want to Fork the repository on GitHub first, and then clone from that. Or clone first and push back to a private repository on GitHub or elsewhere.

If you want to understand the format of library files better, take a look at section 4.10 (Modules) in the Dynamic C 10 Users Guide.

I like to think of the code between BeginHeader/EndHeader comments as equivalent to a .h file, and the other code in the library as a .c file. The BeginHeader comment lists the symbols defined by that block – any of those symbols referenced in compiled code results in compilation of that entire block.

Hi Tom,

Thanks for taking the time to reply. I really appreciate it and all you do for the community!

Just as an FYI. I would not think of modifying a Rabbit library. I am just a EE hack when it comes to programming. I have used Rabbits for many years, but I like to learn something new on each new project to keep it interesting. This time I decided to clean up all my commonly used functions into libraries rather than cutting and pasting code into Main.

Keep up the good work

Regards

Terry