Package Details: mingw-w64-qt5-base-static 5.8.0-2

Git Clone URL: (read-only)
Package Base: mingw-w64-qt5-base-static
Description: A cross-platform application and UI framework (mingw-w64)
Upstream URL:
Licenses: custom, GPL3, LGPL3, FDL
Groups: mingw-w64-qt5
Submitter: ant32
Maintainer: Martchus
Last Packager: Martchus
Votes: 7
Popularity: 0.152121
First Submitted: 2013-08-28 23:57
Last Updated: 2017-03-22 23:20

Required by (54)

Sources (31)

Pinned Comments

Martchus commented on 2017-01-10 21:24

Notes about using static Qt with CMake:

* Checkout the notes about the static version in the PKGBUILD itself
* Seems like find_package(Qt5Core) is still required when building static version. I think this is not really a problem, one just has to know it.
* Here is a simple example:
* I also included a commits showing how to link statically against against Qt plugins and dependencies of Qt itself.

Martchus commented on 2016-07-10 19:47

All my packages are managed at GitHub where you can also contribute directly:
Patches for this package are managed at:

There also exist a binary repository:

For general discussion and issues not only concerning this variant please use the comment section of the package mingw-w64-qt5-base.

Latest Comments

woggioni commented on 2017-03-23 08:13

The only trouble I found is that one of my project had ${Qt5Gui_PRIVATE_INCLUDE_DIRS} in the include path and I had to manually populate the variable to make it compile

Martchus commented on 2017-03-22 23:35

Fixed the MariaDB issue and the `StaticQt5::Test` issue. PostgreSQL must still be fixed in mingw-w64-postgresql.

BTW: The static MariaDB library couldn't be detected before because in my patch the dependency `gdi32` was missing. So for the fix is no sed required at all.

I don't know how to fix the issue of the empty private include dir. It seems that this issue has already been present since quite a while now (maybe even before I was maintainer). Is the missing path causing any further trouble or just a thing you noted?

Martchus commented on 2017-03-21 13:13

Nice, I'll include it with the other fix when I have the time. But maybe I'll patch instead of using `sed`. I ask Schala to update mingw-w64-postgresql.

woggioni commented on 2017-03-21 13:09

I solved the DB plugin issue using ant32's advice for Postgres and adding this to the end of the package function in PKGBUILD to fix MariaDB

if isStatic; then
for file in ${pkgdir}/usr/${_arch}/lib/qt/plugins/sqldrivers/*.prl
sed -i 's/-lmariadb;/-lmariadbclient;/g' $file
sed -i 's/-lmariadb /-lmariadbclient /g' $file

There might be a shorter way but I didn't want to mess with sed regex.
Yes, I really meant CMake own sources.. that is quite sad

Martchus commented on 2017-03-18 17:36

> it's simply because that name is hardcoded in cmake source code :(

Oh, you mean the sources of CMake itself. I guess then we just live with including the non static module, too.

I already have a fix for the test module. Just need to check whether it works.

I guess the condition `!exists($$first(QT.$${MODULE}_private.includes)): CMAKE_NO_PRIVATE_INCLUDES = true` in create_cmake.prf is preventing the variables for private include dirs to be set. Not sure how to fix it yet.

Haven't looked into the issue about the DB plugins yet. Did you any of the things I proposed in the last comment? Do you actually need the plugins or would silencing the errors be good enough?

woggioni commented on 2017-03-17 11:01

I also noticed that strangely in ${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5Gui/StaticQt5GuiConfig.cmake at line 65 there is


while the Gui module has private headers (also proved by /usr/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:57 in standard qt5-base package). This problem also applies to the dynamic variant (mingw-w64-qt5-base).

Martchus commented on 2017-03-16 18:17

So I'll have to fix that, too.

I have to admit that my approach with the 'Static'-prefix is not the best because it requires to change a lot of things. Unfortunately I don't know another way to solve the problem. Installing dynamic and static version in the same prefix is just not officially supported. Maybe it would be best to put the static variant in another prefix like MSYS2 does. However, then it would not be possible to use dynamic and static variant during the same build which is quite nice to build dynamic and static libs of projects depending on Qt at the same time.

woggioni commented on 2017-03-16 17:47

Meanwhile, I discovered why AUTOMOC, AUTOUIC and AUTORCC do not work without including QtCore: it's simply because that name is hardcoded in cmake source code :(

Martchus commented on 2017-03-16 13:20

Using static version with CMake is a mess, but I'll try to fix it.

woggioni commented on 2017-03-16 10:23

I noticed that if you run
grep -nr " Qt5::" StaticQt5*
in ${pkgdir}/usr/x86_64-w64-mingw32/lib/cmake
you get a lot matches that I think should be " StaticQt5::". I noticed because I tried to use StaticQt5::Test from cmake in one of my projects and it was broken because of "/usr/x86_64-w64-mingw32/lib/cmake/StaticQt5Test/StaticQt5TestConfigExtras.cmake" which bears:

set_property(TARGET Qt5::Test ...

instead of

set_property(TARGET StaticQt5::Test ...

All comments