need stdint.h using meaty skeleton

Programming, for all ages and all languages.
Post Reply
bilsch01
Member
Member
Posts: 42
Joined: Sat Dec 19, 2015 10:48 am

need stdint.h using meaty skeleton

Post by bilsch01 »

I'm trying to compile and link meaty skeleton for debugging. I'm doing it with command line in linux Ubuntu. There are several header files in tty.c which have very little meat to them, in particular, stdint.h. There is no such file in meaty skeleton, so the compiler is trying to use the one from the cross compiler. The one from the cross compiler has no definition of size_t or uint_16 types. It has the line:
# include_next<stdint.h> which gets nothing. Before I can debug tty.c linked with an assembly routine I must add debug option in the command line. I'm not using the makefile and shell files to build this for debugging - I'm using the command line as follows:

i686-elf-gcc tty.c -c && i686-elf-gcc -gdwarf kb1.o tty.o -o tty.o -ffreestanding -fbuiltin -Wall -Wextra -nostdlib -lk -lgcc

with header files copied to appropriate locations. But there is no stdint.h file. I can't proceed without it. I seem to be getting by without stddef.h

TIA. Bill S.
User avatar
Nutterts
Member
Member
Posts: 159
Joined: Wed Aug 05, 2015 5:33 pm
Libera.chat IRC: Nutterts
Location: Drenthe, Netherlands

Re: need stdint.h using meaty skeleton

Post by Nutterts »

Plz read this first.
At the very least try to google things like this.

But for what it's worth:
  • size_t isn't part of stdint.h, it's in stddef.h.
  • stdint.h contains standard types like uint16_t, int16_t etc. Not custom definitions like uint_16.
Both files are part of a properly compiled gcc like you get after following the instructions on the wiki.
bilsch01 wrote:i686-elf-gcc tty.c -c && i686-elf-gcc -gdwarf kb1.o tty.o -o tty.o -ffreestanding -fbuiltin -Wall -Wextra -nostdlib -lk -lgcc
I hope you just typed this in a hurry and left stuff out because this is wrong on so many levels.
"Always code as if the guy who ends up maintaining it will be a violent psychopath who knows where you live." - John F. Woods

Failed project: GoOS - https://github.com/nutterts/GoOS
Post Reply