Page 1 of 1

stdint.h: No such file or directory bare bones tutorial

Posted: Sun May 08, 2022 2:15 am
by Techflash
I'm trying to run the bare bones tutorial. I have done all of the steps up to this point, read all the things, made the i686-elf-* cross compilation tools, everything.
When I go to compile however, it gives me the following error:

Code: Select all

/root/opt/cross/lib/gcc/i686-elf/12.1.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
    9 | # include_next <stdint.h>
      |                ^~~~~~~~~~
Did I do something wrong with my cross compiler?

Re: stdint.h: No such file or directory bare bones tutorial

Posted: Sun May 08, 2022 9:07 pm
by nullplan
You are not compiling with -ffreestanding. Look into the file referenced, it will only include the libc stdint.h if __STDC_HOSTED__ is defined nonzero.