Skip to content
Discussion options

You must be logged in to vote

So the problem with the given approach was the fact that in order to cross-compile a binary you need to select not the tripets with the windows prefix, but the ones with mingw prefix, like the following ones:

community/x64-mingw-static
community/x64-mingw-dynamic

Note that for those to work, you need to have mingw-w64 installed, you find more info here.
After installing those, you might need to do some other things depending on the library you want to link with your executable, for instance I had the following problem with the OpenSSL

/usr/lib/gcc/x86_64-w64-mingw32/15.1.0/../../../../x86_64-w64-mingw32/bin/ld: attempted static link of dynamic object `/usr/lib/libssl.so'
collect2: error:…

Replies: 1 comment

Comment options

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