Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Building with Mingw64 on Windows 8

Building with Mingw64 on Windows 8

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
3 Posts 2 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jimmychau
    wrote on last edited by
    #1

    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 [http://www.activestate.com/activeperl/]
    * Python version 2.7 or later [http://www.activestate.com/activepython/]
    * Ruby version 1.9.3 or later [http://rubyinstaller.org/]

    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

    mingw32-make
    

    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 http://wiki.qt.io/Building_Qt_5_from_Git, 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 https://forum.qt.io/topic/72451/tcl-header-missing, would really appreciate if anyone can offer some advice.

    Thanks in advance.

    E 1 Reply Last reply
    0
    • J jimmychau

      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 [http://www.activestate.com/activeperl/]
      * Python version 2.7 or later [http://www.activestate.com/activepython/]
      * Ruby version 1.9.3 or later [http://rubyinstaller.org/]

      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

      mingw32-make
      

      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 http://wiki.qt.io/Building_Qt_5_from_Git, 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 https://forum.qt.io/topic/72451/tcl-header-missing, would really appreciate if anyone can offer some advice.

      Thanks in advance.

      E Offline
      E Offline
      EdwardWelbourne
      wrote on last edited by
      #2

      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:
      https://stackoverflow.com/posts/46708850/edit

      (The Qt Wiki page on building for MS-Win (http://wiki.qt.io/Building_Qt_5_from_Git#Windows_3) 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.)

      E 1 Reply Last reply
      1
      • E EdwardWelbourne

        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:
        https://stackoverflow.com/posts/46708850/edit

        (The Qt Wiki page on building for MS-Win (http://wiki.qt.io/Building_Qt_5_from_Git#Windows_3) 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.)

        E Offline
        E Offline
        EdwardWelbourne
        wrote on last edited by
        #3

        @jimmychau I've now discovered (thanks to a suggestion from a colleague) how to avoid this problem !

        It turns out that building in the MS cmd.exe window works, where building in MinGW's Git Bash shell has the problem above.
        I won't pretend to understand why, but give cmd.exe a try !

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved