This repository has been archived by the owner on Jun 18, 2021. It is now read-only.
Linker errors (unresolved external symbol) building with "-Ctarget-feature=+crt-static" on x86_64-pc-windows-msvc #135
Labels
bug
Something isn't working
When building on windows with the x86_64-pc-windows-msvc toolchain, attempting to statically link the c runtime causes errors during linking.
I'm trying to build with:
During linking there are many errors about unresolved symbols, e.g.:
I made a repo to reproduce the problem: https://github.com/stevebob/wgpu-static-link-error
Here's the output from building on appveyor with the full error: https://ci.appveyor.com/project/stevebob/wgpu-static-link-error/build/job/xibn78580git54b2
All the linker errors begin with libspirv_cross. I thought the spirv_cross crate could be the root cause of this issue, but I can't reproduce the error by linking an app depending on just spirv_cross with +crt-static. Here's my attempt: https://ci.appveyor.com/project/stevebob/spirv-cross-windows-static-link-repro/build/job/9p7ahefakr7u3i4f
Also possibly of note, is the fact that I can successfully compile it with the x86_64-pc-windows-gnu toolchain, which my understanding is that it always statically links the c runtime: https://ci.appveyor.com/project/stevebob/wgpu-static-link-error/build/job/0ws0c9unpfouhvn8
The text was updated successfully, but these errors were encountered: