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.
[SOLVED] GCC suddenly can't find kernel.o
[SOLVED] GCC suddenly can't find kernel.o
Last edited by sirbounce on Tue Apr 04, 2017 1:22 pm, edited 1 time in total.
Re: GCC suddenly can't find kernel.o
sirbounce wrote: KERNEL_ARCH_OBJS=\
$(ARCHDIR)/boot.o \
$(ARCHDIR)/kernel.o \ //Where is this?
$(ARCHDIR)/tty.o \
$(ARCHDIR)/common.o \
$(ARCHDIR)/gdt.o \
$(ARCHDIR)/interrupt.o \
$(ARCHDIR)/isr.o \
$(ARCHDIR)/descriptor_tables.o \
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Re: GCC suddenly can't find kernel.o
kernel.o gets added later in the Makefile, that list is from arch/i386/make.conf, while in the root Makefile it looks like this:octacone wrote:sirbounce wrote: $(ARCHDIR)/kernel.o \ //Where is this?
Code: Select all
KERNEL_OBJS=\
$(KERNEL_ARCH_OBJS) \
kernel/kernel.o \
- Schol-R-LEA
- Member
- Posts: 1925
- Joined: Fri Oct 27, 2006 9:42 am
- Location: Athens, GA, USA
Re: GCC suddenly can't find kernel.o
The what?sirbounce wrote:Hello,
I followed the video tutorial from the wiki on how to build the GCC cross compiler with cygwin on Windows
checks the page
Huh. I never noticed that there.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Re: GCC suddenly can't find kernel.o
In your screenshot there's a backslash (\) character before kernel/kernel.o
I think linker searches for a file named ' kernel/kernel.o' (note the space character).
I think linker searches for a file named ' kernel/kernel.o' (note the space character).
If something looks overcomplicated, most likely it is.
Re: GCC suddenly can't find kernel.o
Wow, that was itVelko wrote:In your screenshot there's a backslash (\) character before kernel/kernel.o
I think linker searches for a file named ' kernel/kernel.o' (note the space character).
I fixed it by removing the last backslash in the KERNEL_ARCH_OBJS list.
Thank you so much!
Yeah it took me some time to notice that tooSchol-R-LEA wrote:The what?sirbounce wrote:Hello,
I followed the video tutorial from the wiki on how to build the GCC cross compiler with cygwin on Windows
checks the page
Huh. I never noticed that there.