Unfortunately i came across this error and i don't know how to solve it.
I believe it has to do with the file "interruptstubs.s" and the code in the line 19 and line 20:
global _ZN16InterruptManager26HandleInterruptRequest\num\()Ev
_ZN16InterruptManager26HandleInterruptRequest\num\()Ev:
Below you can find the output of the command "make mykernel.iso":
as --32 -o loader.o loader.s
g++ -m32 -Iinclude -fno-use-cxa-atexit -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fno-leading-underscore -Wno-write-strings -o port.o -c port.cpp
g++ -m32 -Iinclude -fno-use-cxa-atexit -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fno-leading-underscore -Wno-write-strings -o gdt.o -c gdt.cpp
g++ -m32 -Iinclude -fno-use-cxa-atexit -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fno-leading-underscore -Wno-write-strings -o interrupts.o -c interrupts.cpp
as --32 -o interruptstubs.o interruptstubs.s
g++ -m32 -Iinclude -fno-use-cxa-atexit -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fno-leading-underscore -Wno-write-strings -o kernel.o -c kernel.cpp
ld -melf_i386 -T linkder.ld -o mykernel.bin loader.o port.o gdt.o interrupts.o interruptstubs.o kernel.o
ld: interruptstubs.o: in function `InterruptManager::HandleInterruptRequest0x00()':
(.text+0x0): multiple definition of `InterruptManager::HandleInterruptRequest0x00()'; interrupts.o:interrupts.cpp:(.text+0x34a): first defined here
ld: interruptstubs.o: in function `InterruptManager::HandleInterruptRequest0x01()':
(.text+0xb): multiple definition of `InterruptManager::HandleInterruptRequest0x01()'; interrupts.o:interrupts.cpp:(.text+0x35a): first defined here
make: *** [Makefile:15: mykernel.bin] Error 1
UPDATE: It is working now. All that was needed was to remove the definition of HandleInterruptRequest0x00() and HandleInterruptRequest0x01() from interrupts.cpp file.
I am trying to implement the YouTube series "Writing your own OS".
You can find my code at "https://github.com/tiagomendes7/Build_Your_Own_OS/tree/main".
Unfortunately i came across this error and i don't know how to solve it. I believe it has to do with the file "interruptstubs.s" and the code in the line 19 and line 20:
Below you can find the output of the command "make mykernel.iso":