gcc/djgpp + file system

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
black.fish

gcc/djgpp + file system

Post by black.fish »

Hi! I just want to know, what would happen if I'd compile a c-program with file-usage (fopen, fprintf,...) to flat binary. What would happen if I wrote this binary as the kernel onto a floppy?

black.Fish
Whatever5k

Re:gcc/djgpp + file system

Post by Whatever5k »

Well, if you tried to boot your kernel, there would be a fault. Functions like fopen(), fread(), etc. are system specific. This means, that for example the fopen() function for Windows uses Windows system calls.
So the kernel wouldn't work/run. You have to write *everything* for your own...

good luck...
black.fish

Re:gcc/djgpp + file system

Post by black.fish »

Hmm, that means "no header files"?
Tom

Re:gcc/djgpp + file system

Post by Tom »

that means: Make your own lib!

Or you can use someone elses, like mine or glib ( i think that's what is's called)
dronkit

Re:gcc/djgpp + file system

Post by dronkit »

glib is for graphics. you must be talking about gnu libc. maybe the best version for this kind of use is libc5 since newer versions are quite complex for a simple OS.
Post Reply