I make a search in GCC folder and I found alot of stdio.h files in it so how THEY CANT FIND IT? Here's the pick, all selected files are stdio.h files:
Here's the Cygwin window printscr:
Plz help me m8s! ;-;
Error in GCC building. <stdio.h> not found?
Error in GCC building. <stdio.h> not found?
OS Development is awesome!
|AetherOS Project|
|AetherOS Project|
-
- Member
- Posts: 232
- Joined: Mon Jul 25, 2016 6:54 pm
- Location: Adelaide, Australia
Re: Error in GCC building. <stdio.h> not found?
On second look, you are trying to build the cross-compiler, not the OS. My mistake.
Still, the stdio.h in your gcc directory is not the file that the compiler is looking for. The correct file should be in /usr/include. It appears your cygwin installation is missing this necessary file. I'm not very familiar with cygwin, but this SO post here indicates that you need to install the package cygwin-devel to install the standard c headers.
Wrong info: Presumably you are using a cross compiler to build your OS?
In this case, the compiler will not look for stdio.h in your gcc files, but will expect you to make your own stdio.h and tell the compiler where to find it using a custom include path. This is intentional, as the stdio in gcc will be for your host OS, not for your new OS.
Still, the stdio.h in your gcc directory is not the file that the compiler is looking for. The correct file should be in /usr/include. It appears your cygwin installation is missing this necessary file. I'm not very familiar with cygwin, but this SO post here indicates that you need to install the package cygwin-devel to install the standard c headers.
Wrong info: Presumably you are using a cross compiler to build your OS?
In this case, the compiler will not look for stdio.h in your gcc files, but will expect you to make your own stdio.h and tell the compiler where to find it using a custom include path. This is intentional, as the stdio in gcc will be for your host OS, not for your new OS.
Re: Error in GCC building. <stdio.h> not found?
Thanks m8 I'll try here, an extra info for ya: I'm building a cross-compiles who target mah OS , I'm using $HOME/AetherOS/sysroot as sysroot but I don't have a libc created or ported in it. I'll port Newlib after compiling the compiler (lol)
OS Development is awesome!
|AetherOS Project|
|AetherOS Project|
Re: Error in GCC building. <stdio.h> not found?
****, I have the file in /usr/include :/
OS Development is awesome!
|AetherOS Project|
|AetherOS Project|
-
- Member
- Posts: 5586
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Error in GCC building. <stdio.h> not found?
Are you trying to build a freestanding cross-compiler or a hosted cross-compiler? You can't build a hosted cross-compiler until after you have a C library for your OS's userspace.
Re: Error in GCC building. <stdio.h> not found?
I'm trying to make a Hosted Cross-Compilerq
OS Development is awesome!
|AetherOS Project|
|AetherOS Project|
Re: Error in GCC building. <stdio.h> not found?
AAAAH now I understand so I need to port Newlib or create mah libc so after this I can build mah hosted CC?
OS Development is awesome!
|AetherOS Project|
|AetherOS Project|
-
- Member
- Posts: 232
- Joined: Mon Jul 25, 2016 6:54 pm
- Location: Adelaide, Australia
Re: Error in GCC building. <stdio.h> not found?
Ah, OK. Do you need a hosted compiler?
It is recommended that you only build a hosted compiler once you are quite far advanced in you OS project and are ready to start porting already existing programs to your OS. Once you have built a freestanding compiler (follow instructions here) you can already write and compile code to run on the bare metal, and you can start on your kernel. You don't need a hosted compiler for that.
It is recommended that you only build a hosted compiler once you are quite far advanced in you OS project and are ready to start porting already existing programs to your OS. Once you have built a freestanding compiler (follow instructions here) you can already write and compile code to run on the bare metal, and you can start on your kernel. You don't need a hosted compiler for that.