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

Undefined reference link error after successful compile #30631

Closed
jminer opened this issue Dec 30, 2015 · 2 comments
Closed

Undefined reference link error after successful compile #30631

jminer opened this issue Dec 30, 2015 · 2 comments

Comments

@jminer
Copy link

jminer commented Dec 30, 2015

The following code compiles without error but gives a link error:

https://github.com/jminer/clear-coat/tree/link-error

Further attempts to reduce it have made the error go away, but someone else can probably get it a lot shorter. To reproduce the error, run cargo run --example basic_controls in the link-error branch. In the full code, I have a couple other methods in CallbackRegistry that work fine, but if I try to use remove_callback, I get a link error. Here's the error:

note: C:\Files\Projects\clear-coat\target\debug\examples\basic_controls.0.o: In function `ZN14basic_controls16common_callbacks19CallbackRegistry<F>15remove_callbackE':
c:\Files\Projects\clear-coat/<std macros>:6: undefined reference to `common_callbacks::CallbackRegistry$LT$F$GT$::remove_callback::_FILE_LINE::hdeeab2d67af13153Cba'
c:\Files\Projects\clear-coat/<std macros>:3: undefined reference to `common_callbacks::CallbackRegistry$LT$F$GT$::remove_callback::_FILE_LINE::hdeeab2d67af13153Cba'

I'm using rustc 1.7.0-nightly (b4707eb 2015-12-27) 32-bit GNU on 64-bit Windows 7.

Issue #17610 is another link error, but I don't know if it is the same cause.

@nagisa
Copy link
Member

nagisa commented Dec 30, 2015

Most likely a dupe of #20201 which is a dupe of #16734.

@jminer
Copy link
Author

jminer commented Dec 30, 2015

Thanks, the explanation in #20201 was helpful. I tried reexporting the type and that fixed it. I agree it is a dupe of #16734, so I'll close this one.

@jminer jminer closed this as completed Dec 30, 2015
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

No branches or pull requests

2 participants