I have my "dobin.bat" file and it is complaining that #include-next stdint.h doesn't exist, but there is stdint.h in the directory.
This problem is resolved by -ffreestanding, however, that brings up a bunch of useless errors that aren't even errors that would require a million edits to my code and OSDev (even extern is not a thing, apparently.). How do i make it so i get the effects of no -ffreestanding but the compiler can load stdint.h?
compiling without -ffreestanding
-
- Member
- Posts: 273
- Joined: Sun Oct 09, 2016 4:38 am
- Libera.chat IRC: NunoLava1998
compiling without -ffreestanding
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.
https://github.com/NunoLava1998/DixiumOS
https://github.com/NunoLava1998/DixiumOS
-
- Member
- Posts: 5587
- Joined: Mon Mar 25, 2013 7:01 pm
Re: compiling without -ffreestanding
Are you using a cross compiler?
-
- Member
- Posts: 273
- Joined: Sun Oct 09, 2016 4:38 am
- Libera.chat IRC: NunoLava1998
Re: compiling without -ffreestanding
i686 cross-compiler (GCC). Exactly what OSDev wants. I'm used a compiled-to-exe version from "Ghost", a user here on OSDev, and it works wonderfully.Octocontrabass wrote:Are you using a cross compiler?
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.
https://github.com/NunoLava1998/DixiumOS
https://github.com/NunoLava1998/DixiumOS
-
- Member
- Posts: 5587
- Joined: Mon Mar 25, 2013 7:01 pm
Re: compiling without -ffreestanding
What's your compilation command line?
If your code files aren't all in the same directory, what does your directory structure look like?
If your code files aren't all in the same directory, what does your directory structure look like?
-
- Member
- Posts: 273
- Joined: Sun Oct 09, 2016 4:38 am
- Libera.chat IRC: NunoLava1998
Re: compiling without -ffreestanding
Fixed it (simply put it in a bunch of folders, but it was probably include-fixed). Same result as with -ffreestanding now. How do i make the compiler force compile it or ignore the errors? (or both)
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.
https://github.com/NunoLava1998/DixiumOS
https://github.com/NunoLava1998/DixiumOS
-
- Member
- Posts: 5587
- Joined: Mon Mar 25, 2013 7:01 pm
Re: compiling without -ffreestanding
Freestanding headers like stdint.h are part of the compiler. You shouldn't need to do anything besides #include <stdint.h> in your code in order to use them. It sounds like there's something wrong with your build system.NunoLava1998 wrote:Fixed it (simply put it in a bunch of folders, but it was probably include-fixed).
You don't. You have to fix them, that's why they're errors instead of warnings. (And really, you should fix warnings too. That's why we recommend -Werror in your compiler flags.)NunoLava1998 wrote:How do i make the compiler force compile it or ignore the errors? (or both)