Skip to content

Libraries for cross-compilation to x86_64-pc-windows-gnu #1056

Answered by Alexhuszagh
DwarfsLord asked this question in Q&A
Discussion options

You must be logged in to vote

The target you are building for, x86_64-pc-windows-gnu, is using GCC for a Windows target, but the host OS is x86_64 Linux GNU. So, installing libmysqlclient-dev via apt installs it for x86_64-unknown-linux-gnu. If you would like to use a crate depending on your library, you'll have to build it from source or use a package manager that has it built. Some packages, like libz-mingw-w64-dev, are available from official repositories, but many others aren't.

A few tools and frameworks help for this. For example, vcpkg could let you use it as part of your build step, or you can download it from source and compile it with our toolchain. You can also use MXE (M Cross-Environment).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DwarfsLord
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants