Unusual Question- compiling a kernel, linker troubles!

Discussion about everything. New games, 3d math, development tips...
Post Reply
3ddev
Posts: 169
Joined: Tue Sep 19, 2006 6:51 am
Contact:

Unusual Question- compiling a kernel, linker troubles!

Post by 3ddev »

I decided to take a little break from coding games right now. Just for the fun of it, I decided to try writing my own home-brew kernel. I am compiling the kernel with mingw. Here is the complete list of commands that I am using. It includes NASM for the assembly code:
Compiler/Linker Commands wrote: C:\MingwGCC\bin\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o main.o main.c
C:\Osdever\NASM\nasm.exe -f aout -o start.o start.asm
C:\MingwGCC\bin\ld.exe -T link.ld -o kernel.bin start.o main.o
GCC compiles fine, but ld.exe creates this error:
Error by ld.exe- the linker! wrote: start.o: file not recognized: File format not recognized
I have been using MingW with Graphic Libraries and wxWidgets in Code::Blocks for years. I have never experienced this problem before. Can anyone help? :?

PS. For those curious about making their own kernel and OS, go to http://www.osdever.net. :wink:
_________________
Post Reply