Translate-c can't find header

So i wanted to play with translate-c, to see how the generated code looks like.

I tried translating the kilo editor(GitHub - antirez/kilo: A text editor in less than 1000 LOC with syntax highlight and search. · GitHub), since ot is small, but still complex enough to exercise translate-c.

When i do 'zig translate-c kilo.c", it says that termios.h is not found.

I compiled kilo.c and i was able to run it normally.

Did i miss anything?

Translate c now uses the experimental arocc, instead of clang, to parse and inspect the source.

But compiling still uses clang.

arocc is supposed to be a drop-in replacement, any discrepancy is a bug that you should report (if it isn’t already).

That being said, translate c is only useable with headers, actual c source is not expected to translate correctly if at all.
But that does not, immediately, appear to be relevant to this issue.

Probably missing -lc to “link libc”?

zig translate-c -lc kilo.c

works for me

2 Likes