Menu

#195 How to distribute compiled programs (DLLs? static linking?)

v1.0 (example)
open
nobody
None
5
2024-01-12
2024-01-12
No

I am facing the common problem of a program (SDCC) where binaries for Windows should be distributed. The Windows build is cross-compiled on GNU/Linux compiled with MinGW-w64.

Of course, I run into the problem that MinGW-w64 compiled software depends on DLLs. So I either should link statically instead, or have to somehow find those DLLs (automatically in the build scripts) to distribute them with the compiled binaries.

Finding the DLLs is apparently not trivial; people have come with complex solutions, such as https://blog.rubenwardy.com/2018/05/07/mingw-copy-dlls/ and https://github.com/Unvanquished/release-scripts/blob/master/build-release; however, AFAIK no such tools is currently included in MinGW-w64. I haven't looked into static linking yet.

Is there a good and easy way to distribute MinGW-w64-compiled programs for use on Windows? What is the recommended way for this use-case?

Discussion


Log in to post a comment.

MongoDB Logo MongoDB