rsfbclient icon indicating copy to clipboard operation
rsfbclient copied to clipboard

Can't cross compile from linux to win32

Open AndreiTS opened this issue 5 years ago • 8 comments

I'm trying to create a win32 dll, I'm running: cargo build --target=x86_64-pc-windows-gnu --release

and getting this error: note: /usr/bin/x86_64-w64-mingw32-ld: cannot find -lfbclient

cargo.toml: image

lib.rs: image

AndreiTS avatar Mar 25 '21 18:03 AndreiTS

Please, try without default crate features: rsfbclient = { version="0.16.0", features = ["pure_rust"], default-features = false }

fernandobatels avatar Mar 25 '21 18:03 fernandobatels

Sorry, I said the wrong command, actually it is: cargo build --target=i686-pc-windows-gnu --release

I tried to build in a windows virtual machine to 32bits using platform i686-pc-windows-msvc but it's not working either.

Log from linux: https://pastebin.com/V0KfpCc0

AndreiTS avatar Mar 25 '21 18:03 AndreiTS

I tried compile one o examples here, with i686-pc-windows-gnu, and got the same error. Unfortunately, my experience with cross compile is very superficial.

You can help @jairinhohw ?

fernandobatels avatar Mar 26 '21 01:03 fernandobatels

Are you sure you disabled the default features of the rsfbclient crate? It should compile just fine with only the pure_rust feature.

Edit: You may want to try using the cross tool, maybe it can resolve the issue

jairinhohw avatar Apr 01 '21 04:04 jairinhohw

using cross solve it, thanks

AndreiTS avatar Apr 01 '21 11:04 AndreiTS

It's working on a computer but in the other it still don't work: image But I can work with that.

AndreiTS avatar Apr 01 '21 16:04 AndreiTS

Witch computer is the one that does not work? 32 or 64 bits? Are you using the cross tool?

Maybe it is related to this issue, so it may just be unreliable to cross compile from a x64 (64bits) machine to a x86 (32bits).

jairinhohw avatar Apr 02 '21 16:04 jairinhohw

Both machines are 64bits, using cross

AndreiTS avatar Apr 02 '21 23:04 AndreiTS