equalsraf / win32yank

Windows clipboard tool
ISC License
444 stars 22 forks source link

Unresolved Imports when building #17

Closed Antonio-Bennett closed 1 year ago

Antonio-Bennett commented 1 year ago

Hello sorry for my ignorance but I'm trying to build win32yank and I keep getting unresolved import error as seen below. What is the possible reason? image image

mariansimecek commented 1 year ago

I have the same problem

casret commented 1 year ago

If you are building from linux, you'll need to cross compile. cargo build --target x86_64-pc-windows-gnu -r

jemag commented 1 year ago

Thanks for the info @casret , had a problem with the linker with the cross compilation command however: image Ended up using https://github.com/cross-rs/cross to do it

Basically cargo clean then cross build --target x86_64-pc-windows-gnu which worked for me

gaving commented 1 year ago

Cheers @jemag - cross did the trick for me too!

equalsraf commented 1 year ago

Correct, win32yank is a native windows application (calls the windows clipboard API). To build it from linux or wsl you will always need to cross compile, or build using the native windows toolchain instead.