rust-cross / cargo-zigbuild

Compile Cargo project with zig as linker
MIT License
1.43k stars 51 forks source link

Is cross-compilation on Linux for Windows possible? #200

Closed lnicola closed 9 months ago

lnicola commented 9 months ago

With x86_64-pc-windows-gnu I get:

  = note: lld-link: warning: ignoring unknown argument: -exclude-symbols:_ZN3std2rt10lang_start17h939a6fb8a2a68f4dE
          lld-link: error: -exclude-symbols:_ZN3std2rt10lang_start17h939a6fb8a2a68f4dE is not allowed in .drectve

while x86_64-pc-windows-msvc (understandably?) fails on my system with note: error: FileNotFound.

messense commented 9 months ago

We have partial support for Windows gnu, the lld-link error message suggests that you might have misconfigured the target because lld-link is for msvc.

For windows msvc, use cargo-xwin.

lnicola commented 9 months ago

suggests that you might have misconfigured the target because lld-link is for msvc.

I didn't configure anything :sweat_smile:.

For windows msvc, use cargo-xwin.

Thank you, that works. I'll close the issue, then. Whoever needs Windows support can find it.