I'm planning to use mingw-w64 for commercial software and I'm looking for info about it's licensing. I was looking through licenses included in package and some discussions on forums and mailing lists and I'm still not quite sure if I can use this compiler for my purpose.

Mingw-w64 with default settings requires you to include three dll's with them:

  • libstdc++-6.dll
  • libgcc_s_seh-1.dll
  • libwinpthread-1.dll

Am I allowed to distribute those files with my own software which would be licensed under my own (commercial) license?

Also, can I link those libraries statically? I was looking through some licenses and I found this file, specifically this quote:

These don't apply to the binaries built with
MinGW-w64 unless you specifically tell MinGW-w64 to link against
these parts, for example, by enabling profiling code.

In addition to the notices in this file, also the notices in
COPYING.MinGW-w64-runtime.txt apply to MinGW-w64. Some (possibly
all) notices in that file may apply also to the binaries built with
this version of MinGW-w64. The idea is that if you create binary
packages of your software with MinGW-w64, you can simply copy
COPYING.MinGW-w64-runtime.txt into your package to fulfill the
license requirements of the MinGW runtime.

Which suggests that if I'm building binaries based on mingw-w64 ones, I have to provide this file with my software, which contains those lines at the end:


This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Lesser General Public License for more details.

I'm assuming that it refers to software that I've created, which would mean that I have to distribute my software under GNU LGPL license. Does that mean for me that i have to link this dynamically through dlls in order to keep my own commercial license?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.