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.
.
Also, I can't use the ld command in any way, it always returns: (filename).o unrecognised file format.
Thanks for any help!
Your C compiler reports an error because the identifier "u32int" has not been declared when it reaches the offending line. You need to provide a definition for it, for example
ru2aqare wrote:Your C compiler reports an error because the identifier "u32int" has not been declared when it reaches the offending line. You need to provide a definition for it, for example
I also think you are supposed to know the language you program in
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
ru2aqare wrote:Your C compiler reports an error because the identifier "u32int" has not been declared when it reaches the offending line. You need to provide a definition for it, for example
# for msvc
typedef unsigned __int32 u32int;
# for gcc - i'm not sure
typedef unsigned int u32int;
thanks, ill try that, but its a code sample from the wiki, i assumed they would define the datatypes they use...
This maybe a little off, but I think that sounded a little presumptious. You should be glad that something like an Operating System Development Wiki even exists. We're not exactly completely out of the dark ages of people sitting in dark, damp corners in basements chewing hard on pencils and tapping away at frustrating code without any support whatsoever.
It's interesting how people take stuff for granted. I remember being more than extraordinarily surprised to find a whole community of people offering resources to OSDevers.
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.
ru2aqare wrote:Your C compiler reports an error because the identifier "u32int" has not been declared when it reaches the offending line. You need to provide a definition for it, for example
# for msvc
typedef unsigned __int32 u32int;
# for gcc - i'm not sure
typedef unsigned int u32int;
thanks, ill try that, but its a code sample from the wiki, i assumed they would define the datatypes they use...
The code on the wiki is generally always just a snippet, given in a context to help you better understand the concept it's trying to convey, not in a context to be able to be simply dropped into a project.
Some of the tutorials will hold your hand the entire way, but a lot of them will make assumptions about what you already know.
(and for GCC it is indeed typdef unsigned int u32int;... you can simply drop that in a common header file and be fine)
Kitsune wrote:
Some of the tutorials will hold your hand the entire way, but a lot of them will make assumptions about what you already know.
(and for GCC it is indeed typdef unsigned int u32int;... you can simply drop that in a common header file and be fine)
Regarding the others first, Im sorry if I presumed too much of that code sample.
You see, I've gon through all the beginner tutorial's here, including the baby steps one, but I always get stuck after the "Hello World!" bootloaders when you start to integrate c code. gcc reports errors for anything I try to compile with the tutorials, and then ld always doesnt recognise .o files. It's just getting kinda frustrating cause Hello world is the limit I am able to compile!
To someone else: I used to do c++ and assumed that the syntax would be pretty similar (as long as you dont use advanced c++ things)