shinh / elvm

EsoLangVM Compiler Infrastructure
MIT License
1.13k stars 143 forks source link

8cc cannot find header files: stdio.h and others #125

Closed Foxy6670 closed 1 year ago

Foxy6670 commented 1 year ago

When I'm trying to do anything from C involving STDIO or other C header files, I just get a report that the header file cannot be found, despite being in /usr/include/.

Command run: ~/elvm2/out/8cc -Ilibc -S wwvsim.c -o wwvsim.eir Output: [ERROR] cpp.c:716: wwvsim.c:25:1: cannot find header file: stdio.h Note this happens for EVERY header file. How do I fix this?

System: Devuan GNU/Linux 4 (chimaera) x86_64 Kernel: 5.10.0-18-amd64 Extra info: /usr/include/stdio.h: File exists In the C file I am trying to convert, stdio is included as #include <stdio.h> Help is greatly appreciated. Thank you in advance!

Foxy6670 commented 1 year ago

So I tried using the -I (include) function, that didn't work. Why can't 8cc find header files at all?