os-tutorial
os-tutorial copied to clipboard
Lesson 18 - Multiple Definition Error
Owing to the fact that idt
and idt_reg
were not declared as extern
variables in idt.h
, I encountered a couple of Multiple Definition Errors. I have made the same changes myself.
Me too. But unfortunately this is an unmaintained repo so your PR won't be merged.
Why does conditional compilation (ifndef define endif) not work?
I tested it and found that in the same scenario, clang would not report error, while GCC would
For some reason, when I declared these variables as 'extern' in the header file, the boot loader refused to load strings and all my global string arrays were just full of null pointers. Removing the definitions entirely from the header file and moving them into the source file fixed my issue.