Page 1 of 1

My code don't work(agin)

Posted: Sat May 22, 2010 4:18 pm
by Atom
Ok i try to compile my code and he gives that error:
build.bat

Code: Select all

@echo off
echo Agora montando, compilando, e juntando seu kernel:
C:\djgpp\bin\nasm -f elf -o start.o start.s
rem Lembre-se neste ponto aqui: Nós vamos adicionar comandos 'gcc' para compilar as fontes em C


C:\djgpp\bin\gcc -Wall -O -nostdlib  -nostdinc -fno-builtin -fno-exceptions -I./include -c -o main.o main.c
C:\djgpp\bin\gcc -Wall -O -nostdlib  -nostdinc -fno-builtin -fno-exceptions -I./include -c -o monitor.o monitor.c
C:\djgpp\bin\gcc -Wall -O -nostdlib  -nostdinc  -fno-builtin -fno-exceptions -I./include -c -o common.o common.c

rem Este junta todos seus arquivos. Lembre-se de como você adiciona arquivos *.o, você precisa
rem adicionar após start.o. Se você não adicionar eles de qualquer modo, eles não estarão em seu kernel!
C:\djgpp\bin\ld -T link.ld -o kernel.elf start.o main.o monitor.o common.o 
echo Limpando arquivos objetos...
del *o
echo Feito!
pause
erro

Code: Select all

start.o file not recognized: File format not recognized
I'm using gcc
Can somebody help me?

Re: My code don't work(agin)

Posted: Sat May 22, 2010 4:52 pm
by pcmattman

Re: My code don't work(agin)

Posted: Sat May 22, 2010 5:21 pm
by Gigasoft
Or use the correct output format with nasm. DJGPP uses coff, so you should have -f coff.

Re: My code don't work(agin)

Posted: Sat May 22, 2010 10:06 pm
by Solar
Use English-language comments and output. (I assume your code looks similar to your build script.) When the time comes to ask for help, it makes things much more readable for the international audience you get in forums like this one.

Re: My code don't work(agin)

Posted: Sun May 23, 2010 11:18 am
by Atom
Solar wrote:Use English-language comments and output. (I assume your code looks similar to your build script.) When the time comes to ask for help, it makes things much more readable for the international audience you get in forums like this one.
Oh,sorry #-o
And gus thanks for the help!