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

Create import library to go with dylib on Windows #24763

Closed
retep998 opened this issue Apr 24, 2015 · 3 comments
Closed

Create import library to go with dylib on Windows #24763

retep998 opened this issue Apr 24, 2015 · 3 comments

Comments

@retep998
Copy link
Member

On Windows, in order to link to a .dll you actually link to an import library instead, either .a or .lib. When creating a .dll with rustc --crate-type=dylib however, no such import library is created, thus making it difficult to link to from C/C++.
If an import library is created, the metadata could be moved from the .dll to the library, thus solving #23366.

@vadimcn
Copy link
Contributor

vadimcn commented Apr 24, 2015

rustc --crate-type=dylib -C link-args=-Wl,-out-implib,library.lib ... will cause linker to create an import library in addition to the .dll.

@steveklabnik
Copy link
Member

@retep998 did @vadimcn's suggestion solve this issue?

@steveklabnik
Copy link
Member

Closing until proven otherwise.

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