<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 195: How to distribute compiled programs (DLLs? static linking?)</title><link href="https://sourceforge.net/p/mingw-w64/support-requests/195/" rel="alternate"/><link href="https://sourceforge.net/p/mingw-w64/support-requests/195/feed.atom" rel="self"/><id>https://sourceforge.net/p/mingw-w64/support-requests/195/</id><updated>2024-01-12T17:36:38.338000Z</updated><subtitle>Recent changes to 195: How to distribute compiled programs (DLLs? static linking?)</subtitle><entry><title>How to distribute compiled programs (DLLs? static linking?)</title><link href="https://sourceforge.net/p/mingw-w64/support-requests/195/" rel="alternate"/><published>2024-01-12T17:36:38.338000Z</published><updated>2024-01-12T17:36:38.338000Z</updated><author><name>Philipp Klaus Krause</name><uri>https://sourceforge.net/u/spth/</uri></author><id>https://sourceforge.net62101c6d6b06c3cceba9d6f2b130682c32ff976a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Finding the DLLs is apparently not trivial; people have come with complex solutions, such as &lt;a href="https://blog.rubenwardy.com/2018/05/07/mingw-copy-dlls/" rel="nofollow"&gt;https://blog.rubenwardy.com/2018/05/07/mingw-copy-dlls/&lt;/a&gt; and &lt;a href="https://github.com/Unvanquished/release-scripts/blob/master/build-release;" rel="nofollow"&gt;https://github.com/Unvanquished/release-scripts/blob/master/build-release;&lt;/a&gt; however, AFAIK no such tools is currently included in MinGW-w64. I haven't looked into static linking yet.&lt;/p&gt;
&lt;p&gt;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?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>