Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-compil from Linux to Windows failed #96

Closed
Dalan94 opened this issue Mar 22, 2022 · 3 comments · Fixed by #97
Closed

Cross-compil from Linux to Windows failed #96

Dalan94 opened this issue Mar 22, 2022 · 3 comments · Fixed by #97

Comments

@Dalan94
Copy link
Contributor

Dalan94 commented Mar 22, 2022

When building my application which use systemstat from a Linux host to a windows target (cargo build --target=x86_64-pc-windows-gnu the linker failed ( /usr/lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld: cannot find -lIphlpapi).
The problem is that the library in mingw is in totally in lowercase (iphlpapi) but the linker attribute (in socket.rs and network_interfaces.rs) has the first letter in uppercase (Iphlpapi).
Could you change the linker attributes to make the build succeed.
It shouldn't change the Windows behavior because the filename are case insensitive in Windows.

Regards

@valpackett
Copy link
Owner

We don't link anything directly here, I'm pretty sure this is part of the winapi crate.

@valpackett
Copy link
Owner

oh, haven't checked socket. Can you send a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants