This relates to bison and flex input files that contain C code.
Going to "Settings->Compiler->Other settings. Then look for "Advanced options" in lower right." allows you to specify a command line macro to execute on a file with a particular extension included in your project and also specify if there are any files generated that need to be compiled. There is info about that here
http://wiki.codeblocks.org/index.php?title=Adding_support_for_non_C/C%2B%2B_files_to_the_build_systemThe already existing command line macros for bison and flex input files (extensions .y and .l), generate files with extension .cc - which resulted in scope errors when trying to compile the output of bison with gcc. Note that the bison manual suggests that bison files should have extensions .y++ or .ycc when generating C++ code.
To get around this I added two more macros to generate C files, however this requires that the bison and flex input files have extensions .yc and .lc (which is a bit too inventive):
For bison files with extension .yc
Command line macro:
bison -t -v -d $file -o $file_dir/$file_name.tab.c
Generated files:
$file_dir/$file_name.tab.c
$file_dir/$file_name.tab.h
For flex files with extension .lc
Command line macro:
flex -o$file_dir/$file_name.lex.c $file
Generated files:
$file_dir/$file_name.lex.c
----------------------------
It seems that you can't just then build, you need to bootstrap everything by compiling any .yc and then .lc files individually (Build->CompileCurrentFile). Once the implementation and header files have been created the Build system seems to work fine.