Open zu1k opened 3 years ago
Icons are still not set successfully when cross compile fron linux to windows
Solved by remove lib.rs
Cross-compilation should now work out of the box in v0.1.13 of my fork. I updated the README as well, it had some buggy instructions (target_os
is the host OS when you compile build.rs
).
I'm cross compiling from linux to windows, but I found it not work.
I checked the history issue and found that the problem is still unresolved.
However, in the course of my continuous testing, I found that the
cfg
conditional judgment in the build script does not work.My Test Demo
host system
target: x86_64-unknown-linux-gnu (local)
That's fine, however when cross compile...
target: x86_64-pc-windows-gnu (cross compile)
I expect it to output
window
ortarget_os = windows
, but it panic atunix
My solution
I think it may be because some features were not determined when
build.rs
was compiled and the features not been passed to rustc.I have found some environment variables from the documentation and they can be used to determine target and host.