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

Linking error between Rust crates #29164

Closed
tomaka opened this issue Oct 19, 2015 · 3 comments
Closed

Linking error between Rust crates #29164

tomaka opened this issue Oct 19, 2015 · 3 comments

Comments

@tomaka
Copy link
Contributor

tomaka commented Oct 19, 2015

How to reproduce:

1 - Clone the branch rustc-bug of https://github.com/tomaka/spine-rs
2 - Run cargo test

I get the following linking error with 32bits MinGW (rustc 1.5.0-nightly (20a6938c0 2015-10-16)) when the tests are linked:

note: D:\Projets\spine-rs\target\debug\test-f0708a7cba5cf230.0.o: In function `ZN4test4testE':
D:\Projets\spine-rs/tests/test.rs:11: undefined reference to `skeleton::animation::_$LT$impl$GT$::interpolate::h1389f3fa921899f7Y7b'

Everything is 100% pure safe Rust, so this linking error is clearly a bug.

I don't have time right now to find out precisely what causes it. Calling other functions from SkinAnimation also triggers the linking error. But for example if you only call spine::Skeleton::from_reader (which is another function from that same crate), then you don't get any error.

@tomaka
Copy link
Contributor Author

tomaka commented Oct 19, 2015

I just tried and got the same linking error on linux.

@tomaka tomaka changed the title Linking error between Rust crates with 32bits MinGW Linking error between Rust crates Oct 19, 2015
@alexcrichton
Copy link
Member

I believe this is a duplicate of #16734, so closing in favor of that, but thanks for the report!

If you add a pub use to the top of the crate of SkinAnimation it'll at least paper over the problem for now!

@tafia
Copy link
Contributor

tafia commented Oct 20, 2015

Thanks!

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

3 participants