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

Error when trying to launch program. #20

Closed
thelearnerofcode opened this issue Mar 25, 2018 · 3 comments
Closed

Error when trying to launch program. #20

thelearnerofcode opened this issue Mar 25, 2018 · 3 comments
Assignees

Comments

@thelearnerofcode
Copy link

Hello, when I try to load my program straight from the targets/release directory, I get this errror:
./test_assets: error while loading shared libraries: libshaderc_shared.so: cannot open shared object file: No such file or directory.

However, it works fine when I run it with cargo run --release

@antiagainst
Copy link
Collaborator

Urgh. You are right. For historical reasons, Linux and MacOS are still trying to use the shared library right now:

if target_os == "windows" {
println!("cargo:rustc-link-lib=static=shaderc_combined");
} else {
println!("cargo:rustc-link-lib=dylib=shaderc_shared");
}

When calling your binary directly, the path to the compiled shared binary is missing, which causes the crash. I should convert them to use the static library to be safe. Will fix. Thanks for reporting!

@antiagainst antiagainst self-assigned this Mar 27, 2018
@antiagainst
Copy link
Collaborator

#21 to address this issue.

@antiagainst
Copy link
Collaborator

Fixed via #21.

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