[SOLVED] GCC suddenly can't find kernel.o
Posted: Tue Apr 04, 2017 11:00 am
Hello,
I followed the video tutorial from the wiki on how to build the GCC cross compiler with cygwin on Windows and I used the Meaty Skeleton page to structure the folders, so basically I have the same structure as on the wiki page.
Everything worked fine, I modified the Hello world program and added some stuff like color changing and automatic scroll down, added %d and hex support to printf and stuff like that.
Then I started following the GDT and IDT section of the James Molloy tutorial and I created a VS solution so I can use a decent editor (was using np++) and for a while it compiled fine but I must have messed something up along the way because now GCC says it can't find kernel/kernel.o:
Screenshot
Even though kernel.o is there and it is being generated because when i run build.sh the file is recreated when i delete it.
Obviously I had to modify the ASM files to work with GCC and it seems that I fixed all the errors.
I tried messing with the Makefile but if i try to change the path there, make will output that there are missing rules to make the object (or something like that, it's translated).
My Makefile right now is exactly the same as the one on the wiki, I didn't even change the "myos" name anywhere. And before I started adding the new files from the James Molloy tutorial the kernel compiled fine, maybe I creating a VS solution did some damage?
I tried excluding the new files from the build (see below) as the GDT part was not even implemented in the kernel yet but it still throws that error.
Also, to make new C files work i have to manually add them to the makefile.conf file like that:
KERNEL_ARCH_OBJS=\
$(ARCHDIR)/boot.o \
$(ARCHDIR)/tty.o \
$(ARCHDIR)/common.o \
$(ARCHDIR)/gdt.o \
$(ARCHDIR)/interrupt.o \
$(ARCHDIR)/isr.o \
$(ARCHDIR)/descriptor_tables.o \
Is this the right way to do that?
Is there something more I need to provide? I can't figure out what caused this problem.
Thanks.
I followed the video tutorial from the wiki on how to build the GCC cross compiler with cygwin on Windows and I used the Meaty Skeleton page to structure the folders, so basically I have the same structure as on the wiki page.
Everything worked fine, I modified the Hello world program and added some stuff like color changing and automatic scroll down, added %d and hex support to printf and stuff like that.
Then I started following the GDT and IDT section of the James Molloy tutorial and I created a VS solution so I can use a decent editor (was using np++) and for a while it compiled fine but I must have messed something up along the way because now GCC says it can't find kernel/kernel.o:
Screenshot
Even though kernel.o is there and it is being generated because when i run build.sh the file is recreated when i delete it.
Obviously I had to modify the ASM files to work with GCC and it seems that I fixed all the errors.
I tried messing with the Makefile but if i try to change the path there, make will output that there are missing rules to make the object (or something like that, it's translated).
My Makefile right now is exactly the same as the one on the wiki, I didn't even change the "myos" name anywhere. And before I started adding the new files from the James Molloy tutorial the kernel compiled fine, maybe I creating a VS solution did some damage?
I tried excluding the new files from the build (see below) as the GDT part was not even implemented in the kernel yet but it still throws that error.
Also, to make new C files work i have to manually add them to the makefile.conf file like that:
KERNEL_ARCH_OBJS=\
$(ARCHDIR)/boot.o \
$(ARCHDIR)/tty.o \
$(ARCHDIR)/common.o \
$(ARCHDIR)/gdt.o \
$(ARCHDIR)/interrupt.o \
$(ARCHDIR)/isr.o \
$(ARCHDIR)/descriptor_tables.o \
Is this the right way to do that?
Is there something more I need to provide? I can't figure out what caused this problem.
Thanks.