Page 1 of 1

Windows Enviroment for OSDev

Posted: Fri Jan 12, 2007 7:10 am
by GendoIkari
What kind of enviroment should i set to develop os under win2k?

On Linux all is simple and smart. I use gcc and ld, nasm and all goes well.
But when i install cygwin or minsys under windows, the same options that i use under linus do not work.
Strange error like: "cannot perform pe actions on a not pe files" (?), or the linker do not know the options "-oformat binary", etc...

Obviosly i do something wrong, or i have to use differnt compiler and linker options. I've installed now Code::Blocks, like other forum user, but how can i get it work?

tnks

Posted: Fri Jan 12, 2007 7:13 am
by Solar
The Linux toolchain is aimed at creating ELF executables (running under Linux), the Windows toolchain at creating PE executables (running under Windows).

This problem has resurfaced frequently; a quick and easy way to get a ELF toolchain under Cygwin is to build a GCC Cross-Compiler. Try it, it's quite easy.

Posted: Fri Jan 12, 2007 7:20 am
by GendoIkari
but i do not want compile elf executables with windows, i want to compile plain binary executables for my kernel.
I do that with the link that you've given me?

Posted: Fri Jan 12, 2007 7:38 am
by Solar
Yes you can.

Posted: Fri Jan 12, 2007 7:26 pm
by smbogan
Personally I use DJGPP, nasm, and ld on windows...I think Bran's kernel tutorial tells what the command line options are that work for OS dev.