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

Including ti84pce.h in multiple files causes linktime warnings. #16

Closed
elfprince13 opened this issue Feb 8, 2016 · 10 comments
Closed
Labels

Comments

@elfprince13
Copy link
Contributor

If I #include <ti84pce.h> in multiple files, at link time, the object files for some of them emit duplicate symbol warnings for __frameset:

WARNING (909) (00000000 rb_tree\misc.obj)--> Public symbol "__frameset" already externally defined.
WARNING (909) (00D1D3EE rb_tree\misc.obj)--> Public symbol "__frameset" already externally defined.

If I rewrite these later files with #pragma asm to provide equates for only the labels I need, the warning is not emitted.

@adriweb
Copy link
Member

adriweb commented Feb 8, 2016

Tagging this as an external issue until proven otherwise, as include guards are already present, so I'm not sure what to do about it...

@debrouxl
Copy link
Collaborator

debrouxl commented Feb 8, 2016

Include guards protect against multiple inclusion of a given header during a single compiler invocation, but they're powerless against single or multiple inclusion of a given header during multiple independent compiler invocations.
Now, why exactly is the toolchain complaining about __frameset specially, which is an equate in the ASM file included by ti84pce.h, I don't know.

@adriweb
Copy link
Member

adriweb commented Feb 8, 2016

Oh, yeah, "multiple independent compiler invocations", you're probably right...

@jacobly0
Copy link
Member

jacobly0 commented Feb 8, 2016

WARNING (909) (00000000 Z:\opt\CEdev\lib\std\chelp.lib)--> Public symbol "__imuls" already externally defined.
WARNING (909) (00D1CEC1 Z:\opt\CEdev\lib\std\chelp.lib)--> Public symbol "__imuls" already externally defined.

I believe this is related.

@elfprince13
Copy link
Contributor Author

Perhaps turning the equates into a mix of defines and xrefs would help?

@elfprince13
Copy link
Contributor Author

I think "external issue" is not the right tag for this. It's not a compiler issue, it's a "the include file doesn't behave like an include file, because it introduces link-time symbols, rather than merely providing forward declarations" issue.

@adriweb
Copy link
Member

adriweb commented Feb 21, 2016

Yeah, removed it.

@mateoconlechuga
Copy link
Member

Just use _At rather than equ.

@mateoconlechuga
Copy link
Member

The best solution would be to redo the standard libraries to use the libraries in the bootcode. This probably means modifying the crtl source so it doesn't cause these warnings.

@mateoconlechuga
Copy link
Member

Fixed with release v2.0 (And no, changing the name to 'tice.h' wasn't the solution :P)

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

No branches or pull requests

5 participants