You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows 7 x64, with rust msvc compiled at 0172e46 as well as rustc 1.15.0-nightly (ba872f2 2016-11-17)
It seems a bin/lib crate that depends on a lib crate that in turn depends on a proc macro crate doesn't compile because rustc complains that the proc macro crate was compiled as a dylib.
I have a proc macro crate foo, a lib crate bar that depends on foo, and a bin crate baz that depends on bar. bar compiles fine and generates libbar.rlib, but baz fails to compile with:
error[E0462]: found staticlib `foo` instead of rlib or dylib which `bar` depends on
--> src\main.rs:1:1
|
1 | extern crate bar;
| ^^^^^^^^^^^^^^^^^
|
= help: please recompile that crate using --crate-type lib
= note: crate `foo` path #1: C:\Stuff\Sources\baz\target\debug\deps\foo-7f298898a71a7d96.dll.lib
Windows 7 x64, with rust msvc compiled at 0172e46 as well as rustc 1.15.0-nightly (ba872f2 2016-11-17)
It seems a bin/lib crate that depends on a lib crate that in turn depends on a proc macro crate doesn't compile because rustc complains that the proc macro crate was compiled as a dylib.
I have a proc macro crate
foo
, a lib cratebar
that depends onfoo
, and a bin cratebaz
that depends onbar
.bar
compiles fine and generateslibbar.rlib
, butbaz
fails to compile with:Repro: https://github.com/Arnavion/rust-37839 Run
cargo build
underbaz/
On Linux, since only a .so is generated (no .lib equivalent), the error is different but the cause is presumably the same.
Note again that this error is when compiling
baz
. There is no problem when compilingbar
.The text was updated successfully, but these errors were encountered: