J
James Harris
If distributing a piece of code in C how is it best to provide it?
Options seem to be
1. Precompile the module.c file(s) to module.o and provide a header.
The using code then has
#include "module.h"
at the top and needs to be linked with the compiled module.
2. Include the source directly. The using code then has
#include "module.c"
at the lowest lexical level - i.e. not within a function. Are both of
these viable ways to include a separate piece of source code and and
are there any others?
Options seem to be
1. Precompile the module.c file(s) to module.o and provide a header.
The using code then has
#include "module.h"
at the top and needs to be linked with the compiled module.
2. Include the source directly. The using code then has
#include "module.c"
at the lowest lexical level - i.e. not within a function. Are both of
these viable ways to include a separate piece of source code and and
are there any others?