DJGPP COMPILE ERROR

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
jason7007

DJGPP COMPILE ERROR

Post by jason7007 »

Hi,

I was following Bran's Kernel Development. But everytime I tried to build I got this message

c:/djgpp/lib/gcc-lib/djgpp/3.1/djgpp.ver:1:25 sys/version.h: No such file or directory(ENOENT)


Here is the Build.bat

echo Now assembling, compiling, and linking your kernel:
nasm -f aout -o start.o start.asm
rem Remember this spot here: We will add 'gcc' commands here to compile C sources

gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o main.o main.c

gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o scrn.o scrn.c

gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o gdt.o gdt.c

gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o idt.o idt.c

gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o isrs.o isrs.c

gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o irq.o irq.c

gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o timer.o timer.c

gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o kb.o kb.c

rem This links all your files. Remember that as you add *.o files, you need to
rem add them after start.o. If you don't add them at all, they won't be in your kernel!
ld -T link.ld -o kernel.bin start.o main.o scrn.o gdt.o idt.o isrs.o irq.o timer.o kb.o
echo Cleaning up object files...
del *.o
echo Done!
pause


What is wrong with this?

Any help would be appreciated.
raywill

Re:DJGPP COMPILE ERROR

Post by raywill »

c:/djgpp/lib/gcc-lib/djgpp/3.1/djgpp.ver:1:25 sys/version.h: No such file or directory(ENOENT)
Was it because the directory name too long?(djgpp.ver:1:25)
Warrior

Re:DJGPP COMPILE ERROR

Post by Warrior »

No, in your include folder make a folder /sys/ and an empty file version.h

That is how I've gotten around it. In the future you might want to use a makefile to get over the character limit in the batch file.
jason7007

Re:DJGPP COMPILE ERROR

Post by jason7007 »

Hi Nelson,

Your the Man.

Thank u very much
Post Reply