Building with Mingw64 on Windows 8

  • Hi Everyone,

    I want to have my program compiled with mingw64, so I tried to have qt itself compiled with mingw64.

    I downloaded the source qt-everywhere-opensource-src-5.7.0, then in the read me it stated

    Ensure that the following tools can be found in the path:
    * Perl version 5.12 or later []
    * Python version 2.7 or later []
    * Ruby version 1.9.3 or later []

    which I did.

    Then I did

    configure -prefix E:\somepath\qt\build -opensource -nomake tests
    configure -prefix %CD%\qtbase <license> -nomake tests <== exact instruction in the readme

    which returned no error.
    Then I did


    which was what my mingw64 came with.

    it did lots of g++ compile line, for example:

    g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++1z -fexceptions -mthreads -frtti -Wall -Wextra -Wno-unknown-pragmas -Wno-comment -Wno-missing-field-initializers -Wno-switch -Wno-unused-parameter -Wno-write-strings -Wno-sign-compare -Wno -missing-braces -Wno-unused-but-set-variable -Wno-unused-variable -Wno-narrowing -Wno-maybe-uninitialized -Wno-strict-aliasing -Wno-type-limits -Wno-unused-local-typedefs -Wno-reorder -Wno-conversion-null -Wno-delete-non-virtual-dtor -Wvla -Wdate-time -DUNICODE -D_WINDOWS -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DWIN32_LEAN_AND_MEAN=1 -DANGLE_ENABLE_D3D11 -DANGLE_DEFAULT_D3D11=1 -DNDEBUG -D_SECURE_SCL=0 -D_LIB -DANGLE_TRANSLATOR_IMPLEMENTATION -DANGLE_TRANSLATOR_STATIC -DANGLE_ENABLE_HLSL -I. -I. -I.. -IE:/srcpath/qt/qt-src-5.7.0/qtbase/src/angle/src/../include  -I../../../3rdparty/angle/src -I../../../3rdparty/angle/include -I../../../../mkspecs/win32-g++ -o .obj/release/UniformHLSL.o../../../3rdparty/angle/src/compiler/translator/UniformHLSL.cpp
    g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++1z -fexceptions -mthreads -frtti -Wall -Wextra -Wno-unknown-pragmas -Wno-comment -Wno-missing-field-initializers -Wno-switch -Wno-unused-parameter -Wno-write-strings -Wno-sign-compare -Wno -missing-braces -Wno-unused-but-set-variable -Wno-unused-variable -Wno-narrowing -Wno-maybe-uninitialized -Wno-strict-aliasing -Wno-type-limits -Wno-unused-local-typedefs -Wno-reorder -Wno-conversion-null -Wno-delete-non-virtual-dtor -Wvla -Wdate-time -DUNICODE -D_WINDOWS -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DWIN32_LEAN_AND_MEAN=1 -DANGLE_ENABLE_D3D11 -DANGLE_DEFAULT_D3D11=1 -DNDEBUG -D_SECURE_SCL=0 -D_LIB -DANGLE_TRANSLATOR_IMPLEMENTATION -DANGLE_TRANSLATOR_STATIC -DANGLE_ENABLE_HLSL -I. -I. -I.. -IE:/srcpath/qt/qt-src-5.7.0/qtbase/src/angle/src/../include -I../../../3rdparty/angle/src -I../../../3rdparty/angle/include -I../../../../mkspecs/win32-g++  -o .obj/release/UtilsHLSL.o ../../../3rdparty/angle/src/compiler/translator/UtilsHLSL.cpp

    which should be expected.

    Then it came to some line in the directX SDK

    "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Utilities\bin\x86\fxc.exe" /nologo /E VS_Passthrough2D /T vs_4_0_level_9_3 /Fh libANGLE/renderer/d3d/d3d11/shaders/compiled/passthrough2d11vs.h ../../../3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/shaders/Passthrough2D11.hlsl
    Too many files specified ('E:/' was the last one), use /? to get usage information
    Makefile.Debug:743: recipe for target 'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthrough2d11vs.h' failed

    I think something gone wrong with the /nologo /E VS_Passthrough2D that it mistreated the /E as specifying E:/, is there some error in some script or some version error of my SDK?

    I have tried some alternative by following instruction on, building with msys2, however also faced some error since some file source specified in the git is permanently moved, and I found no way around it, specified in post, would really appreciate if anyone can offer some advice.

    Thanks in advance.

  • I have the same error, compiling Qt with angle for MinGW, despite having no E:/ drive on my (virtual) machine (and nothing configured to use it). It's using the same command as yours.

    I doubt /E has anything to do with the E:/ drive; and it makes no sense that it claims E:/ as the last path on the command-line (when there is no such entry in the command-line at all). Maybe fxc.exe is invoking something else, with a synthesised command-line, that it's getting wrong. Hard to tell when something that's meant to simply work doesn't :-(

    I found that running fxc.exe with /? just got me an error (compilation failed; no code produced) rather than providing the help promised in the error message; this encourages the conjecture that the error actually comes from something else.

    There's a matching thread on Stack Overflow, that might be worth watching:

    (The Qt Wiki page on building for MS-Win ( stresses that the source and build directory need to be equally deeply nested on the same partition. An odd condition, that I was unwittingly violating; however, conforming to that didn't help.)

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.