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

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Techflash
Member
Member
Posts: 70
Joined: Sun May 08, 2022 2:10 am

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

Post 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?
nullplan
Member
Member
Posts: 1790
Joined: Wed Aug 30, 2017 8:24 am

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

Post 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.
Carpe diem!
Post Reply