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

Windows linker error on nightly Rust (unresolved external symbol __imp_ExtractIconW referenced in function get_app_icon) #24

Closed
udoprog opened this issue Mar 8, 2019 · 7 comments
Labels
bug Something isn't working

Comments

@udoprog
Copy link

udoprog commented Mar 8, 2019

Hey,

It seems like rust std will no longer link to shell32.dll, which is a dependency of pancurses (used through cursive for Windows support).

  = note: libpdcurses-b041d7947661b96d.rlib(pdcscrn.o) : error LNK2019: unresolved external symbol __imp_ExtractIconW referenced in function get_app_icon
          E:\work\repo\ncspot\target\debug\deps\ncspot-545a65ef205f4774.exe : fatal error LNK1120: 1 unresolved externals

Cursive and pancurses will need to be bumped once it has been fixed here:
ihalila/pdcurses-sys#5

A temporary workaround is to add a build.rs in ncspot with the following in it for Windows users:

fn main() {
    println!("cargo:rustc-link-lib=dylib=shell32");
}
@hrkfdn hrkfdn added the bug Something isn't working label Mar 8, 2019
@udoprog
Copy link
Author

udoprog commented Mar 9, 2019

Related: rust-lang/rust#56568

@gyscos
Copy link
Contributor

gyscos commented Mar 14, 2019

Should be fixed if you run cargo update

@hrkfdn
Copy link
Owner

hrkfdn commented Mar 18, 2019

@udoprog can you confirm it is fixed?

@udoprog
Copy link
Author

udoprog commented Mar 20, 2019

I think so, but I can't test right now due to #38

@hrkfdn
Copy link
Owner

hrkfdn commented Mar 20, 2019

@udoprog I have switched to directories, wanna give it another spin? :)

@udoprog
Copy link
Author

udoprog commented Mar 21, 2019

Yeah, fixed. Thanks!

@udoprog udoprog closed this as completed Mar 21, 2019
@hrkfdn
Copy link
Owner

hrkfdn commented Mar 21, 2019

Great, thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants