Question about Bare Bones tutorial

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
User avatar
samoz
Member
Member
Posts: 59
Joined: Sun Jun 01, 2008 1:16 pm

Question about Bare Bones tutorial

Post 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.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

add -melf_i386 to your ld command line.
Post Reply