I am trying to use coan to generate a clean version of a codebase but it creashes on the first source code fine on the first definition, using:
coan source -DNON_SMS --filter c,h --recurse --replace test -V
coan: progress 0x00101: Processing file (1)
coan: D:\Documents\Downloads\test\cli.c: line 53: error 0x00816: "NON_SMS" expands to nothing within expression, in "#if ( NON_SMS ) /* Non-SMS compile */"
coan: progress 0x02101: Completed with errors, exit code 0x04
coan: info 0x02201: 1 out of 41 input files were reached; 40 files were not reached
coan: info 0x02202: 0 out of 1 files reached were valid; 1 were abandoned due to parse errors
#if ( NON_SMS ) /* Non-SMS compile */
#include <stdlib.h> /* Standard library definitions */
#include <string.h> /* String related definitions */
Coan expects that when the code is like
MACRO will have a value -- if you just wanted to test whether the macro is defined, you would have written
So you need to give
NON_SMS a value, e.g.
coan source -DNON_SMS=1 --filter c,h --recurse --replace test -V