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.
There used to be a label saying something like "You are expected to use a cross-compiler" on the wiki. there used to be an FAQ entry telling you to build one once you get references to alloca.
Sadly, the only remaining reference I could find on short notice is on the crosscompiler page itself
"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 ]
Meshounah wrote:funny that bona fide os dev tutorial works in linux but not in cygwin
A crosscompiler is your best bet. It is compiled for your OS and if you like you can even add your own target to gcc/binutils and have it compile for your OS by default.
Linux tends to be a lot less encumbered with compatibility and legacy stuff than Windows; yet I've run into a few small issues with it that I don't have now with a normal crosscompiler. In most cases you should be fine though.
Cygwin is a small bit different but has a fair chance of working. I think it does add underscores, so it's got at least a few things you need to hack around.
MingW has a lot of different bits, not the least of which is the amount of Windows integration. Don't use it for OS dev (as in, don't even try to).
DJGPP should have died a long time ago. It doesn't even produce code that any normal OS should hope to work in and has too many hacks.
Most of the ports of GCC for windows(Cygwin, MingW) don't support compiling to binary or ELF. The only way to compile to binary would be to use a cross compiler.