Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lesson 18 - Multiple Definition Error #169

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Lesson 18 - Multiple Definition Error #169

wants to merge 2 commits into from

Conversation

RaamyPi
Copy link

@RaamyPi RaamyPi commented Jul 21, 2020

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.

Fix to get rid any possible multiple definition errors in `18-interrupts`
Fix to get rid any possible multiple definition errors in `18-interrupts`
@TLHorse
Copy link

TLHorse commented Jul 31, 2020

Me too. But unfortunately this is an unmaintained repo so your PR won't be merged.

@gaoze1998
Copy link

Why does conditional compilation (ifndef define endif) not work?

@gaoze1998
Copy link

I tested it and found that in the same scenario, clang would not report error, while GCC would

@atlant04
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants