saurvs/nfd-rs

Linkerror on windows

Septias opened this issue · 1 comments

With this code

fn main() {
    let t = nfd::open_file_dialog(None, Some("")).unwrap();
}

rust panics in the build-phase because of the following error:

error: linking with `link.exe` failed: exit code: 1120
...
= note: Non-UTF-8 output: libnfd-2d582c35cd8355e4.rlib(nfd_win.o) : error LNK2019: Reference to unresolved external symbol \"__imp_SHCreateItemFromParsingName\" in function \"\"enum nfdresult_t __cdecl SetDefaultPath(struct IFileDialog *,char const *)\" (?SetDefaultPath@@YA?AW4nfdresult_t@@PEAUIFileDialog@@PEBD@Z)\".\r\nD:\\dev\\repositories\\rust-playground\\target\\debug\\deps\\rust_playground.exe 
: fatal error LNK1120: 1 not resoved extern

duplicate of #18