Page 1 of 1

Question about Bare Bones tutorial

Posted: Tue Jun 03, 2008 12:37 pm
by samoz
Hey guys, I've been following the barebones tutorial [url]http://www.osdev.org/wiki/Bare_bones
[/url] and I'm getting some weird errors when I link the two .o files together. Here it is:

Code: Select all

/cygdrive/c/depot/tools/gcc-elf-x86/ld: i386 architecture of input file `loader.
o' is incompatible with i386:x86-64 output
/cygdrive/c/depot/tools/gcc-elf-x86/ld: unknown architecture of input file `kernel.o' is incompatible with i386:x86-64 output
Any reason this is happening?

I'm running Windows on this computer. I also have cygwin installed.

Posted: Tue Jun 03, 2008 12:59 pm
by JamesM
add -melf_i386 to your ld command line.