-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Description
I have a workspace set up where the root crate is a normal library crate and one of the sub-crates has crate-type dylib
. In this setup the tests on the sub-crate can't be executed. Running the test exe (cargo test --all
) exits with exit code:
-1073741515
Which converted becomes: 0xC0000135 = STATUS_DLL_NOT_FOUND
And I get a graphical error message stating:
The program can't start because test-83fa84e3d0f7a116.dll is missing
from your computer. Try reinstalling the program to fix this problem.
And then another dialog with the same message but test-
replaced with std-
. The crate must both be part of the workspace and have the crate-type dylib
to trigger this problem.
I tried this code:
root/Cargo.toml
:
[package]
name = "root"
version = "0.1.0"
[workspace]
members = ["dylib"]
root/dylib/Cargo.toml
:
[package]
name = "dylib"
version = "0.1.0"
[lib]
crate-type = ["dylib"]
And then I run cargo test --all
in the root crate or cargo test
in the dylib crate.
Meta
Happens on both stable and nightly:
rustc 1.15.0 (10893a9a3 2017-01-19)
rustc 1.16.0-nightly (24055d0f2 2017-01-31)
Same problem on both x86_64-pc-windows-msvc
and x86_64-pc-windows-gnu
. Tried both on my own machine and in appveyor. Same result.