icon

@deontic-logic/proof-tool/releases/statdeps_v3

Static libraries of Cairo 1.16.0, GMP 6.1.2 and wxWidgets 3.1.3, for MinGW-w64 GCC compiler.

  • Tested and confirmed to work with up to GCC 12.2.0 + LLVM 14.0.6 + MinGW-w64 10.0.0 MSVCRT (release 2).
  • Built for MSVCRT. Make sure to never mix with binaries built to use UCRT.
  • Proclamation: The most recent wxWidgets version that is not broken when built for Windows clients will likely remain to be 3.1.3.
    I have informed the wxWidgets community of major rendering performance issues in MSW mode for the wxGrid component, but was met with contempt because I wouldn't want to create a smaller sample or fix the issue myself. Further context is provided at the building instructions below. (archived forum post)
    They even closed the there mentioned GitHub issue after clarifying how they feel entitled to my time and efforts, and making many false assertions concerning reproducibility, to which I only had to say some rather harsh words.

Usage

  1. Extract the archive's contents to a folder ${LIBS_HOME}. (The archives share files and folders but have no conflicts.)
  2. As GCC C++ Compiler options, add the appropriate include paths using -I flags.
  3. As MinGW C++ Linker options, add the appropriate library search paths using -L flags, and the required libraries using -l flags.

Include Path Options

  • Cairo 1.16.0
    • -I${LIBS_HOME}/cairo-1.16.0/include
  • GMP 6.1.2
    • -I${LIBS_HOME}/gmp-6.1.2/include
  • wxWidgets 3.1.3
    • 32 bit
      • -I${LIBS_HOME}/wxWidgets-3.1.3/lib/wx/include/msw-unicode-static-3.1 -I${LIBS_HOME}/wxWidgets-3.1.3/include
    • 64 bit
      • -I${LIBS_HOME}/wxWidgets-3.1.3/lib/wx/include/msw-unicode-static-3.1_x64 -I${LIBS_HOME}/wxWidgets-3.1.3/include

Library Search Path Options

  • Cairo 1.16.0
    • 32 bit
      • -L${LIBS_HOME}/cairo-1.16.0/lib/i386
    • 64 bit
      • -L${LIBS_HOME}/cairo-1.16.0/lib/x64
  • GMP 6.1.2
    • 32 bit
      • -L${LIBS_HOME}/gmp-6.1.2/lib/i386
    • 64 bit
      • -L${LIBS_HOME}/gmp-6.1.2/lib/x64
  • wxWidgets 3.1.3
    • -L${LIBS_HOME}/wxWidgets-3.1.3/lib

Library Include Options

  • 32 bit release
    • -lgmp -lcairo -lpixman-1 -lfreetype -lpng -lharfbuzz -lbz2 -lwx_mswu-3.1 -lwxpng-3.1 -lwxzlib-3.1 -lwxscintilla-3.1 -luxtheme -limm32 -lz -lrpcrt4 -loleaut32 -lole32 -luuid -loleacc -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lcomdlg32 -ladvapi32 -lversion -lwsock32 -lgdi32
  • 32 bit debug
    • -lgmp -lcairo -lpixman-1 -lfreetype -lpng -lharfbuzz -lbz2 -lwx_mswu-3.1d -lwxpng-3.1d -lwxzlib-3.1d -lwxscintilla-3.1d -luxtheme -limm32 -lz -lrpcrt4 -loleaut32 -lole32 -luuid -loleacc -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lcomdlg32 -ladvapi32 -lversion -lwsock32 -lgdi32
  • 64 bit release
    • -lgmp -lcairo -lpixman-1 -lfreetype -lpng -lharfbuzz -lbz2 -lwx_mswu-3.1_x64 -lwxpng-3.1_x64 -lwxzlib-3.1_x64 -lwxscintilla-3.1_x64 -luxtheme -limm32 -lz -lrpcrt4 -loleaut32 -lole32 -luuid -loleacc -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lcomdlg32 -ladvapi32 -lversion -lwsock32 -lgdi32
  • 64 bit debug
    • -lgmp -lcairo -lpixman-1 -lfreetype -lpng -lharfbuzz -lbz2 -lwx_mswu-3.1d_x64 -lwxpng-3.1d_x64 -lwxzlib-3.1d_x64 -lwxscintilla-3.1d_x64 -luxtheme -limm32 -lz -lrpcrt4 -loleaut32 -lole32 -luuid -loleacc -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lcomdlg32 -ladvapi32 -lversion -lwsock32 -lgdi32

Build

I have built wxWidgets 3.1.3 on my own and obtained compatible static libraries for Cairo 1.16.0 and GMP 6.1.2 from rwinlib/cairo and rwinlib/gmp, respectively.
Utilized compilers were taken from GCC 11.2.0 + MinGW-w64 9.0.0 MSVCRT (release 6). These are posix-dwarf-gcc-11.2.0 for 32 bit and posix-seh-gcc-11.2.0 for 64 bit.

wxWidgets 3.1.3

The success of the official building process on Windows systems depends on intransparent factors. It often fails and tends to require communication overhead to assist getting around flaws in the official building script, which depends on compiler quirks, path properties of third party tools, and even using multi-threaded building. After mentioning these guides to circumvent such issues in their forums (archived), it became apparent that some wxWidgets community members really despise solutions that are thought outside the box, such as this one.
The idea of this guide is to make use of the fact that the building process for Linux distributions is much more reliable, by using a Unix-like environment for configuring the build scripts, which are then modified to work with MinGW-w64 on Windows systems. A single search and replace operation on a single makefile is sufficient to build only the static libraries, but in case a full build is desired, one should go with the modifications required to build dynamic libraries, which make use of a shell script to apply search and replace operations on all the generated makefiles.
Configuring commands for wxWidgets 3.1.3 that I executed in Mintty's Cygwin64 Terminal while having the appropriate standalone MinGW-w64 compiler version installed:

  • 32 bit

    • ./configure CC=C:/mingw-w64/winlibs-i686-posix-dwarf-gcc-11.2.0-mingw-w64-9.0.0-r6/mingw32/bin/gcc CXX=C:/mingw-w64/winlibs-i686-posix-dwarf-gcc-11.2.0-mingw-w64-9.0.0-r6/mingw32/bin/g++ --disable-shared --enable-monolithic --with-expat=builtin --with-libpng=builtin --with-libjpeg=builtin --with-libtiff=builtin --with-zlib=builtin --disable-dependency-tracking
  • 64 bit

    • ./configure CC=C:/mingw-w64/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64-9.0.0-r6/mingw64/bin/gcc CXX=C:/mingw-w64/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64-9.0.0-r6/mingw64/bin/g++ --disable-shared --enable-monolithic --with-expat=builtin --with-libpng=builtin --with-libjpeg=builtin --with-libtiff=builtin --with-zlib=builtin --disable-dependency-tracking

For debug builds, --enable-debug must be appended. Then for both 32 bit and 64 bit, the static libraries can be built using

mingw32-make -j4 BUILD=release UNICODE=1 SHARED=0 MONOLITHIC=1

for release builds, and

mingw32-make -j4 BUILD=debug UNICODE=1 SHARED=0 MONOLITHIC=1

for debug builds.

Walkthrough

  1. Put the MinGW-w64 bin folder path into the system environment variable 'Path', and remove all other paths of GCC versions.
    For example, C:/mingw-w64/winlibs-i686-posix-dwarf-gcc-11.2.0-mingw-w64-9.0.0-r6/mingw32/bin for 32 bit
    and C:/mingw-w64/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64-9.0.0-r6/mingw64/bin for 64 bit.
  2. Extract wxWidgets-3.1.3.7z to C:/wxWidgets-3.1.3.
  3. Execute commands in Cygwin64 Terminal:
    • cd C:/wxWidgets-3.1.3
    • ./configure [...] depending on the variant as noted above
      My result of the configure command looked like:
      Which GUI toolkit should wxWidgets use?                 msw
      Should wxWidgets be compiled into single library?       yes
      Should wxWidgets be linked as a shared library?         no
      Should wxWidgets support Unicode?                       yes (using wchar_t)
      What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.8      no
                                       wxWidgets 3.0      yes
      Which libraries should wxWidgets use?
                                       STL                no
                                       jpeg               builtin
                                       png                builtin
                                       regex              builtin
                                       tiff               builtin
                                       lzma               no
                                       zlib               builtin
                                       expat              builtin
                                       libmspack          no
                                       sdl                no
      
  4. In ./Makefile, change wx_top_builddir = /cygdrive/c/wxWidgets-3.1.3 to wx_top_builddir = C:/wxWidgets-3.1.3.
  5. Shut down Cygwin64 Terminal and open CMD, then execute commands:
    • cd C:/wxWidgets-3.1.3
    • mingw32-make [...] depending on the variant as noted above
      The process terminates with an error mingw32-make: *** [makefile:14768: wxrc] Error 2, but built all the static libraries already.
  6. Rename all the generated <name>.a files to
    • 32 bit debug
      • <name>d.a
    • 64 bit release
      • <name>_x64.a
    • 64 bit debug
      • <name>d_x64.a
  7. For 64 bit, in ./lib/wx/include, rename the generated folder msw-unicode-static-3.1 to msw-unicode-static-3.1_x64.