I am having a problem building Pathfinder 3's demo on my Windows 10 machine.
I know that someone else has been able to run the demo on Windows 10, so it is possible. However, I am running into an issue which has been difficult to troubleshoot.
I cloned the repo, and commented out the single reference to jemalloc
(which does not target Win10).
To set up SDL2, I followed the instructions under header Windows (MSVC) of the Rust SDL2 readme.
To run the demo, I use the following commands via powershell, after changing into the demo/native
directory:
$env:RUSTFLAGS += "-C target-cpu=native"
cargo run --release
If I do not have the SDL2 lib files under .multirust/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc
, then I get an error complaining about *.lib files not being found:
fatal error LNK1181: cannot open input file 'SDL2.lib'
Putting the *.lib files into that folder fixes this issue.
If I put the SDL2.dll file in the main pathfinder folder, I get the error:
error LNK2019: unresolved external symbol __imp_SHCreateItemFromParsingName referenced in function "enum nfdresult_t __cdecl SetDefaultPath(struct IFileDialog *,char const *)"
If I put the SDL2.dll in the demo/native
folder, I get the same error as above.
I have tried using the developer command prompts of VS2015, and VS2017, but with no luck. In particular, when trying to build using these prompts, I cannot use the RUSTFLAGS
suggested, so I omit them.
I also tried using git bash, but the same error noted in the title occurs. What can I try next?