Hi,
First, I want to thank you for the work you do on HuC, I think this is the most complete and thorough groupment of tools and documentation for PCE development :)
As I understand, huc / hucc are not made for linking objects files nor compiling from distinct *.c files and the cleanest way would be to use #include "other.c" in the main source file.
From what I could test huc / hucc can take multiple .c files as input but does not propagate #define directives from one file to the next.
As a result, the following example :
defs.h
#ifndef DEFS_H
#define DEFS_H
unsigned char example;
#endif
main.c
#include <huc.h>
#include "defs.h"
void main() {
// some code
}
other.c
#include <huc.h>
#include "defs.h"
// some routines
results in
hucc -s main.c other.c
defining the _example label multiple time.
Should the propagation of labels be implemented when invoking from multiple sources ?
Or is there a need to add a "--no-labels-exports" directive for example so that .c files could be compiled separately and then assembled with PCEAS without multiple definitions ?
Hi,
First, I want to thank you for the work you do on HuC, I think this is the most complete and thorough groupment of tools and documentation for PCE development :)
As I understand, huc / hucc are not made for linking objects files nor compiling from distinct *.c files and the cleanest way would be to use
#include "other.c"in the main source file.From what I could test huc / hucc can take multiple .c files as input but does not propagate
#definedirectives from one file to the next.As a result, the following example :
defs.h
main.c
other.c
results in
hucc -s main.c other.cdefining the
_examplelabel multiple time.Should the propagation of labels be implemented when invoking from multiple sources ?
Or is there a need to add a "--no-labels-exports" directive for example so that .c files could be compiled separately and then assembled with PCEAS without multiple definitions ?