Difference between revisions of "A Note on My BoostC Projects and Libraries"

From OpenCircuits
Jump to navigation Jump to search
(New page: Draft, not ready for reading I am fairly new to C and not an expert in the structure of larger projects. The following applies to my projects using what I have been calling Libraries. ...)
(No difference)

Revision as of 19:49, 9 March 2009

Draft, not ready for reading


I am fairly new to C and not an expert in the structure of larger projects. The following applies to my projects using what I have been calling Libraries. Now most libaries in C are distributed as object files and then linked into their projects. I am not quie sure how to best do this and in any case I want to distribute the source code. Finally I want to be able to use conditional compilation and do not know how to achieve the same effects without compiling everyting at once. So to use on of the libaries you need to make a copy of it and its .h file and add it to the other files for the project. Additionally there is some content that needs to be included in all files. For that purpose I have a file called Project.h it is included in all the files of the project.

Libraries are typically distrubuted in 2 .c files. One contains the source code of the libary the other is a sample/test/demo program that uses the libary. Of course there is also a set of .h files including Project.h

Including Project.h in your files should not cause any problems or increase code size unless we hav some name collisions, take a look for a quick check.

For documentation of Project.h see this page and the file itself. Currently it contains only a #define for the clock speed.