Closed adamhutchings closed 2 years ago
That's because there's no main function. If you look at jobs output
% ../../cmake/yfc return-good.yf --dump-commands
ANALYSE (COMPILE) file=return-good.yf prefix=(null) syms=(null) out=return-good.c
COMPILE (COMPILE) file=return-good.yf prefix=(null) syms=(null) out=return-good.c
"/usr/bin/clang" "-c" "return-good.c" "-o" "return-good.o"
"/usr/bin/clang" "return-good.o" "-o" "a.out"
Error: yfc: Compilation command failed
It's actually the linking that failed, not C compilation
It would be best to write a specific error message to tell that linking failed.
Absolutely. I’m going to fix this along with the other issue with main function prefixing.