Current status of wxWidgets with MinGW based compilers

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Current status of wxWidgets with MinGW based compilers

Post by New Pagodi » Fri Nov 24, 2017 1:06 am

Since there have been, so many questions about MinGW lately, I decided to make a list of what is currently working and what isn't. I've considered the following compilers:
The official MinGW release
TDM-GCC
MSYS2

I've tried building wxWidgets 3.0.3, 3.1.0, and git master. For each version, I tried 4 configurations: shared multilib, shared monolithic, static multilib, and static monolithic. I only tried debug builds.

For 32bit compilers

Code: Select all

wx 3.0.3  | shared, multi | shared, mono | static, multi | static, mono |
----------+---------------+--------------+---------------+--------------+
TDM 4.9.2 |      yes      |     yes      |      yes      |      yes     |
TDM 5.1.0 |      yes      |     yes      |      yes      |      yes     |
Official  |      no       |     no       |      no       |      no      |

Code: Select all

wx 3.1.0  | shared, multi | shared, mono | static, multi | static, mono |
----------+---------------+--------------+---------------+--------------+
TDM 4.9.2 |      yes      |     yes      |      yes      |      yes     |
TDM 5.1.0 |      yes      |     yes      |      yes      |      yes     |
Official  |      no       |     no       |      no       |      no      |

Code: Select all

git master| shared, multi | shared, mono | static, multi | static, mono |
----------+---------------+--------------+---------------+--------------+
TDM 4.9.2 |      yes      |     yes      |      yes      |      yes     |
TDM 5.1.0 |      yes      |     yes      |      yes      |      yes     |
Official  |      yes      |     yes      |      yes      |      yes     |
For 64 bit compilers

Code: Select all

wx 3.0.3  | shared, multi | shared, mono | static, multi | static, mono |
----------+---------------+--------------+---------------+--------------+
TDM 4.9.2 |      yes      |     yes      |      yes      |      yes     |
TDM 5.1.0 |      yes      |     yes      |      yes      |      yes     |
MSYS2     |      yes      |     yes      |      yes      |      yes     |

Code: Select all

wx 3.1.0  | shared, multi | shared, mono | static, multi | static, mono |
----------+---------------+--------------+---------------+--------------+
TDM 4.9.2 |      yes      |     no       |      yes      |      yes     |
TDM 5.1.0 |      yes      |     no       |      yes      |      yes     |
MSYS2     |      yes      |     yes      |      yes      |      yes     |

Code: Select all

git master| shared, multi | shared, mono | static, multi | static, mono |
----------+---------------+--------------+---------------+--------------+
TDM 4.9.2 |      yes      |     no       |      yes      |      no      |
TDM 5.1.0 |      yes      |     no       |      yes      |      yes     |
MSYS2     |      yes      |     yes      |      yes      |      yes     |
Build commands used

Code: Select all

shared, multi: mingw32-make -f makefile.gcc BUILD=debug SHARED=1
shared, mono:  mingw32-make -f makefile.gcc BUILD=debug SHARED=1 MONOLITHIC=1
static, multi: mingw32-make -f makefile.gcc BUILD=debug
static, mono:  mingw32-make -f makefile.gcc BUILD=debug MONOLITHIC=1
Final comments
  • I don't think its necessary to add CXXFLAGS="-std=gnu++11" to the build command with a recent release of wxWidgets and a recent version of the compiler.
  • The most important thing when using a MinGW based compiler is to make sure only version is used at a time. The easiest way to do this is to 1) do not add the compiler to the global system path when it is installed, and 2) only use the MinGW command prompt included with the package to build wxWidgets.
Last edited by New Pagodi on Fri Dec 08, 2017 3:29 pm, edited 1 time in total.

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 269
Joined: Fri Nov 03, 2006 2:00 pm

Re: Current status of wxWidgets with MinGW based compilers

Post by stahta01 » Fri Nov 24, 2017 3:01 am

Was the TDM builds using 64 bit or 32 bit GCC compiler?
Was the MSys2 builds using 64 bit or 32 bit MinGW GCC compiler?

Note: Two months ago, the MSys2 MinGW GCC monolithic wxWidgets builds were not usable.
Linking error because of MinGW64 C Run-time Library; using allow dups something might avoid the linking error.

Tim S.

New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Re: Current status of wxWidgets with MinGW based compilers

Post by New Pagodi » Fri Nov 24, 2017 3:31 am

The 32 bit versions of TDM-GCC were tdm-gcc-4.9.2.exe and tdm-gcc-5.1.0-3.exe. The 64 bit versions were tdm64-gcc-4.9.2-3.exe and tdm64-gcc-5.1.0-2.exe.

The MSYS2 builds were using the mingw64 toolchain ie the contents of <msys2root>\mingw64 . The multiple definition bug has apparently been fixed very recently. The monolithic builds were failing as of a few weeks ago, but they are now working. (I only know that because I installed Ruby a few weeks ago and it brought MSYS2 with it. So I figured since it's installed anyway, I might as well try it out. But it failed with monolithic builds as mentioned.)

User avatar
tierra
Site Admin
Site Admin
Posts: 1340
Joined: Sun Aug 29, 2004 7:14 pm
Location: Salt Lake City, Utah, USA
Contact:

Re: Current status of wxWidgets with MinGW based compilers

Post by tierra » Sun Nov 26, 2017 3:07 am

I'm not sure if you're aware of this, but wxWidgets has some AppVeyor CI builds setup that are constantly monitoring merged commits and pull requests for MinGW (32bit), MSYS2 (64bit), and Cygwin.

Builds are found here:
https://ci.appveyor.com/project/wxWidgets/wxwidgets

Environment details here:
https://www.appveyor.com/docs/build-env ... sys-cygwin

I know this was building when 3.1.0 was released as well, but not with 3.0.x.

eranif
Moderator
Moderator
Posts: 606
Joined: Tue Nov 29, 2005 7:10 pm
Location: Israel

Re: Current status of wxWidgets with MinGW based compilers

Post by eranif » Sun Dec 10, 2017 6:52 am

Hi,

To add to that list:

I am compiling wxWidgets with MinGW-w64 GCC7.1 and GCC7.2 without a problem
My build command is:

I run these 2 commands (the first is needed to generate the setup. file):

Code: Select all

mingw32-make -f makefile.gcc setup_h SHARED=1 UNICODE=1 BUILD=release
mingw32-make -j8 -f Makefile.gcc SHARED=1 UNICODE=1 BUILD=release CXXFLAGS="-fno-keep-inline-dllexport -std=c++11"
C++11 note:
If you plan on using C++11 with your application and you also plan on using PCH, than you must pass this flag to the wxWidgets build
Or you will get "Invalid PCH" warning from the compiler.
IDE: CodeLite + wxCrafter
OS: All
https://wxcrafter.codelite.org
https://codelite.org

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2057
Joined: Sun Jan 03, 2010 5:45 pm

Re: Current status of wxWidgets with MinGW based compilers

Post by PB » Sun Dec 10, 2017 10:29 am

The GIT master builds with current MinGW32 (GCC 6.3) again, after the https://github.com/wxWidgets/wxWidgets/ ... 9876e047d9 commit.

I have tested only multilib builds in gnu++14 mode with basically

Code: Select all

mingw32-make -f makefile.gcc BUILD=debug CXXFLAGS="-std=gnu++14"
mingw32-make -f makefile.gcc BUILD=release CXXFLAGS="-std=gnu++14"

mingw32-make -f makefile.gcc BUILD=debug SHARED=1 CXXFLAGS="-std=gnu++14"
mingw32-make -f makefile.gcc BUILD=release SHARED=1 CXXFLAGS="-std=gnu++14"

Post Reply