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

Copydeps cannot resolve any dll #11

Open
Vince-LD opened this issue Aug 6, 2023 · 4 comments
Open

Copydeps cannot resolve any dll #11

Vince-LD opened this issue Aug 6, 2023 · 4 comments
Labels
PE Issue specific to PE files Windows Issue specific to running on MS Windows

Comments

@Vince-LD
Copy link

Vince-LD commented Aug 6, 2023

Hello,
I just built my first Rust tool that uses opencv. I'd like to distribute it to some friends but don't want them to get through the hassle of getting all the required .dll so your tool seems perfect to bundle the libraries with the .exe.

I installed copydeps via cargo install copydeps and tried to run copydeps absolute_path_to_my.exe.
I got the output :

copydeps: failed to resolve "MSVCP140.dll"
copydeps: failed to resolve "VCRUNTIME140.dll"
copydeps: failed to resolve "VCRUNTIME140_1.dll"
copydeps: failed to resolve "api-ms-win-crt-heap-l1-1-0.dll"
copydeps: failed to resolve "api-ms-win-crt-locale-l1-1-0.dll"
copydeps: failed to resolve "api-ms-win-crt-math-l1-1-0.dll"
copydeps: failed to resolve "api-ms-win-crt-runtime-l1-1-0.dll"
copydeps: failed to resolve "api-ms-win-crt-stdio-l1-1-0.dll"
copydeps: failed to resolve "api-ms-win-crt-string-l1-1-0.dll"
copydeps: failed to resolve "bcrypt.dll"
copydeps: failed to resolve "opencv_world470.dll"

when I use the dependency_runner crate with the command deprun path_to_my.exe I get the correct path to de dlls.

If i have to manually copy/paste paths to copydeps from deprun, it would be the same as copying them by hand. Do you have any idea of how to fix this issue?

@suve
Copy link
Owner

suve commented Aug 6, 2023

Which OS are you running?

@Vince-LD
Copy link
Author

Vince-LD commented Aug 6, 2023

Yes sorry I completely forget to write it, I'm on Windows 11.

@suve
Copy link
Owner

suve commented Aug 6, 2023

The simple truth is I've written this to be a Linux tool and never gave running under Windows any thought.

Adding support for running under Windows could be a nice feature, though. Thanks for mentioning dependency_runner - offloading the job of resolving files to another crate would make this a lot easier.

@Vince-LD
Copy link
Author

Vince-LD commented Aug 6, 2023

That makes sense haha

I don't know how easy it is to parse a JSON in Rust but deprun has a JSON output that may be used by copydeps for a cheap and dirty fix.

@suve suve added Windows Issue specific to running on MS Windows PE Issue specific to PE files labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PE Issue specific to PE files Windows Issue specific to running on MS Windows
Projects
None yet
Development

No branches or pull requests

2 participants