Page 1 of 1

gcc/djgpp + file system

Posted: Sun Oct 27, 2002 6:49 am
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

Re:gcc/djgpp + file system

Posted: Sun Oct 27, 2002 7:15 am
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...

Re:gcc/djgpp + file system

Posted: Sun Oct 27, 2002 8:03 am
by black.fish
Hmm, that means "no header files"?

Re:gcc/djgpp + file system

Posted: Sun Oct 27, 2002 9:14 am
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)

Re:gcc/djgpp + file system

Posted: Wed Oct 30, 2002 8:12 am
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.