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. Cannot run compiler 'g++'. Output:
Forum Update on Monday, May 27th 2025

Cannot run compiler 'g++'. Output:

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
3 Posts 3 Posters 2.1k 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.
  • P Offline
    P Offline
    peterg98
    wrote on 21 Feb 2020, 15:19 last edited by
    #1

    I've installed the latest Qt version on my Windows 10 machine with the online installer, alongside with the latest MinGW 64 bit versions (in both the Qt section and development section of the installer). I've looked at many posts to try to fix this issue but they do not work for me. I get this error on the example projects I open and ones I create. Here is the log from the compile output:

    01:08:27: Running steps for project addressbook...
    01:08:27: Starting: "C:\Qt\5.14.1\mingw73_64\bin\qmake.exe" C:\Qt\Examples\Qt-5.14.1\widgets\itemviews\addressbook\addressbook.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug"
    The system cannot find the path specified.
    Project ERROR: Cannot run compiler 'g++'. Output:
    ===================
    # 1 "C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp"
    # 1 "<built-in>"
    # 1 "<command-line>"
    # 1 "C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp"
    QT_COMPILER_STDCXX = 201402L
    # 26 "C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp"
    QMAKE_GCC_MAJOR_VERSION = 7
    QMAKE_GCC_MINOR_VERSION = 3
    QMAKE_GCC_PATCH_VERSION = 0
    ===================
    Maybe you forgot to setup the environment?
    01:08:27: The process "C:\Qt\5.14.1\mingw73_64\bin\qmake.exe" exited with code 3.
    Error while building/deploying project addressbook (kit: Desktop Qt 5.14.1 MinGW 64-bit)
    When executing step "qmake"
    

    Here are some additional screencaps of my options:

    error1.PNG

    error2.PNG

    I can confirm that C:\Qt\Tools\mingw730_64\bin\g++.exe exists, and C:\Qt\Tools\mingw730_64\bin is also added to PATH. I've tried the offline installer as well, with and without admin permissions but it didn't work. Everything seemingly looks fine (no red highlights or anything like that) so what is the problem here?

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on 28 Feb 2020, 18:13 last edited by A Former User
      #2

      Same problem here.
      Using Qt 5.14.1, MinGw7.3 64bit
      Had same problem with 5.12.7

      19:07:39: Running steps for project application...
      19:07:39: Starting: "C:\Qt\5.14.1\mingw73_64\bin\qmake.exe" C:\Qt\Examples\Qt-5.14.1\widgets\mainwindows\application\application.pro -spec win32-g++ "CONFIG+=debug"
      The system cannot find the path specified.
      Project ERROR: Cannot run compiler 'g++'. Output:
      ===================
      # 1 "C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp"
      # 1 "<built-in>"
      # 1 "<command-line>"
      # 1 "C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp"
      QT_COMPILER_STDCXX = 201402L
      # 26 "C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp"
      QMAKE_GCC_MAJOR_VERSION = 7
      QMAKE_GCC_MINOR_VERSION = 3
      QMAKE_GCC_PATCH_VERSION = 0
      ===================
      Maybe you forgot to setup the environment?
      19:07:39: The process "C:\Qt\5.14.1\mingw73_64\bin\qmake.exe" exited with code 3.
      Error while building/deploying project application (kit: Desktop Qt 5.14.1 MinGW 64-bit)
      When executing step "qmake"
      19:07:39: Elapsed time: 00:00.
      

      Here is the debug output:

      19:34:41: Running steps for project application...
      19:34:41: Starting: "C:\Qt\5.14.1\mingw73_64\bin\qmake.exe" C:\Qt\Examples\Qt-5.14.1\widgets\mainwindows\application\application.pro -spec win32-g++ "CONFIG+=debug" -d
      DEBUG 1: Resetting dir to: C:\Qt\Examples\Qt-5.14.1\widgets\mainwindows\build-application-Desktop_Qt_5_14_1_MinGW_64_bit-Debug
      DEBUG 1: Changing dir to: C:\Qt\Examples\Qt-5.14.1\widgets\mainwindows\application
      DEBUG 1: visiting file C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf: entering block
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:5: QMAKE_DIR_SEP := \\
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:6: QMAKE_DIRLIST_SEP := ;
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:8: QMAKE_EXT_C := .c
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:9: QMAKE_EXT_CPP := .cpp .cc .cxx
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:10: QMAKE_EXT_OBJC := .m
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:11: QMAKE_EXT_OBJCXX := .mm
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:12: QMAKE_EXT_CPP_MOC := .moc
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:13: QMAKE_EXT_H := .h .hpp .hh .hxx
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:14: QMAKE_EXT_H_MOC := .cpp
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:15: QMAKE_EXT_JS := .js
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:16: QMAKE_EXT_LEX := .l
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:17: QMAKE_EXT_LIBTOOL := .la
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:18: QMAKE_EXT_PKGCONFIG := .pc
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:19: QMAKE_EXT_PRL := .prl
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:20: QMAKE_EXT_UI := .ui
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:21: QMAKE_EXT_YACC := .y
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:23: QMAKE_CPP_MOD_MOC := 
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:24: QMAKE_H_MOD_MOC := moc_
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:25: QMAKE_MOD_LEX := _lex
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:26: QMAKE_MOD_YACC := _yacc
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:28: defined test function ensurePathEnv
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:36: evaluating test function "equals"
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:36: calling built-in equals(QMAKE_HOST.os, Windows)
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:36: test function returned true
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:36: taking 'then' branch
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:36: entering block
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:37: QMAKE_EXT_OBJ := .obj
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:38: QMAKE_EXT_RES := .res
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:39: QMAKE_SH := 
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:40: evaluating test function "ensurePathEnv"
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:40: calling ensurePathEnv()
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf: entering block
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:29: evaluating test function "isEmpty"
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:29: calling built-in isEmpty(QMAKE_PATH_ENV)
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:29: test function returned true
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:29: taking 'then' branch
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:29: entering block
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/spec_pre.prf:30: QMAKE_PATH_ENV := 
      ...
      
      
      ...
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:14: evaluating test function "isEmpty"
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:14: calling built-in isEmpty(QT_LICHECK)
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:14: test function returned true
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:14: AND
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:14: NOT
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:14: skipped condition "QTDIR_build"
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:14: taking 'else' branch
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:14: finished 'else' branch
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:29: evaluating test function "CONFIG"
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:29: calling built-in CONFIG(debug, debug|release)
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:29: test function returned false
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:29: taking 'else' branch
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:29: entering block
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:32: DEFINES := UNICODE _UNICODE WIN32 MINGW_HAS_SECURE_API=1
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:32: leaving block, okey=true
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:32: finished 'else' branch
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:35: evaluating test function "load"
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:35: calling built-in load(toolchain)
      DEBUG 1: visiting file C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf: entering block
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:1: defined test function qtToolchainError
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:11: defined test function qtCompilerError
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:22: condition "cross_compile" is false
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:22: AND
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:22: skipped condition "host_build"
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:22: taking 'else' branch
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:22: entering block
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:24: target_prefix := QMAKE_CXX
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:24: leaving block, okey=true
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:24: finished 'else' branch
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:31: defined replace function qtVariablesFromMSVC
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:37: defined replace function qtVariablesFromGCC
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/The system cannot find the path specified.
      toolchain.prf:44: evaluating test function "isEmpty"
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:44: calling built-in isEmpty(QMAKE_CXX.COMPILER_MACROS)
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:44: test function returned true
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:44: taking 'then' branch
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:44: entering block
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:45: condition "msvc" is false
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:45: taking 'else' branch
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:45: entering block
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:63: condition "gcc" is true
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:63: OR
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:63: skipped condition "ghs"
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:63: taking 'then' branch
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:63: entering block
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:64: calling $$qtVariablesFromGCC(g++)
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf: entering block
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:38: calling built-in $$system_quote(C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp)
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:39: calling built-in $$system("g++ -E C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp  2>NUL", lines, ec)
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:39: ret := "# 1 \"C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp\"" "# 1 \"<built-in>\"" "# 1 \"<command-line>\"" "# 1 \"C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp\"" "QT_COMPILER_STDCXX = 201402L" "# 26 \"C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp\"" "QMAKE_GCC_MAJOR_VERSION = 7" "QMAKE_GCC_MINOR_VERSION = 3" "QMAKE_GCC_PATCH_VERSION = 0"
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:40: NOT
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:40: evaluating test function "equals"
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:40: calling built-in equals(ec, 0)
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:40: test function returned false
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:40: AND
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:40: evaluating test function "qtCompilerError"
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:40: calling qtCompilerError(g++, "# 1 \"C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp\"" "# 1 \"<built-in>\"" "# 1 \"<command-line>\"" "# 1 \"C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp\"" "QT_COMPILER_STDCXX = 201402L" "# 26 \"C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp\"" "QMAKE_GCC_MAJOR_VERSION = 7" "QMAKE_GCC_MINOR_VERSION = 3" "QMAKE_GCC_PATCH_VERSION = 0")
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf: entering block
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:12: NOT
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:12: condition "cross_compile" is false
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:12: taking 'then' branch
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:12: entering block
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:12: what := 
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:12: leaving block, okey=true
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:12: finished 'then' branch
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:18: evaluating test function "qtToolchainError"
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:18: calling qtToolchainError("Cannot run compiler \'g++\'. Output:", "# 1 \"C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp\"" "# 1 \"<built-in>\"" "# 1 \"<command-line>\"" "# 1 \"C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp\"" "QT_COMPILER_STDCXX = 201402L" "# 26 \"C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp\"" "QMAKE_GCC_MAJOR_VERSION = 7" "QMAKE_GCC_MINOR_VERSION = 3" "QMAKE_GCC_PATCH_VERSION = 0", "Maybe you forgot to setup the environment?")
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf: entering block
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:7: msg := "Cannot run compiler \'g++\'. Output:" =================== "# 1 \"C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp\"" "# 1 \"<built-in>\"" "# 1 \"<command-line>\"" "# 1 \"C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp\"" "QT_COMPILER_STDCXX = 201402L" "# 26 \"C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp\"" "QMAKE_GCC_MAJOR_VERSION = 7" "QMAKE_GCC_MINOR_VERSION = 3" "QMAKE_GCC_PATCH_VERSION = 0" =================== "Maybe you forgot to setup the environment?"
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:8: evaluating test function "error"
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:8: calling built-in $$escape_expand(\\n)
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:8: calling built-in $$join(msg, \n)
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:8: calling built-in error("Cannot run compiler \'g++\'. Output:\n===================\n# 1 \"C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp\"\n# 1 \"<built-in>\"\n# 1 \"<command-line>\"\n# 1 \"C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp\"\nQT_COMPILER_STDCXX = 201402L\n# 26 \"C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp\"\nQMAKE_GCC_MAJOR_VERSION = 7\nQMAKE_GCC_MINOR_VERSION = 3\nQMAKE_GCC_PATCH_VERSION = 0\n===================\nMaybe you forgot to setup the environment?")
      Project ERROR: Cannot run compiler 'g++'. Output:
      ===================
      # 1 "C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp"
      # 1 "<built-in>"
      # 1 "<command-line>"
      # 1 "C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp"
      QT_COMPILER_STDCXX = 201402L
      # 26 "C:/Qt/5.14.1/mingw73_64/mkspecs/features/data/macros.cpp"
      QMAKE_GCC_MAJOR_VERSION = 7
      QMAKE_GCC_MINOR_VERSION = 3
      QMAKE_GCC_PATCH_VERSION = 0
      ===================
      Maybe you forgot to setup the environment?
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:8: aborting block, function status: error
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:18: aborting block, function status: error
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:40: aborting block, function status: error
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:64: aborting block, status: error
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:64: finished 'then' branch
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:64: aborting block, status: error
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:64: finished 'else' branch
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:64: aborting block, status: error
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:64: finished 'then' branch
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/toolchain.prf:64: aborting block, status: error
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/default_pre.prf:35: aborting block, function status: error
      DEBUG 1: C:/Qt/5.14.1/mingw73_64/mkspecs/features/win32/default_pre.prf:2: aborting block, function status: error
      19:34:52: The process "C:\Qt\5.14.1\mingw73_64\bin\qmake.exe" exited with code 3.
      Error while building/deploying project application (kit: Desktop Qt 5.14.1 MinGW 64-bit)
      When executing step "qmake"
      19:34:52: Elapsed time: 00:11.
      
      1 Reply Last reply
      0
      • D Offline
        D Offline
        dawnhowe-sync
        wrote on 10 Aug 2020, 05:02 last edited by
        #3

        I had exactly the same problem you did. I think the problem is an interaction with Qt and VS2017/VS2019 being installed (or recently upgraded). We were having the same problem building on Windows 10. Our project is compiling our Qt project with both Visual Studio 2019 (using the MSVC compiler), and with Qt 5.12.7 (using a MinGW 64bit compiler).

        We had a pretty big refactor, so I deleted build directories and *pro.user files. Then I had the same thing happen to our Qt projects. I also created a default project, closed Qt and when I restarted it, I could not parse the *.pro file with the same error you saw. After some investigation, I restored .qmake.stash files that I had deleted (from the Recycle Bin) and the build started working again.

        What I pieced out is that Qt depends on qmake running (This bug was supposed to be fixed: https://bugreports.qt.io/browse/QTBUG-60059, but I decided to focus on qmake). After a bunch of trial and error (without a good explanation of why it work), I found a solution.

        I got this procedure to work a few times.

        • delete any build artifacts and *pro.user file
        • open project and configure it for MinGW 64bit.
        • get the error
        • to build->run qmake (You can watch the Compile output to see that it runs properly)
        • click on "File"->Close Project
        • click on "Files"->recent projects and pick your project to open again.
        • Now it's fixed!
        • Be safe and do a build.

        Also, as long as you don't blow away all the build artifacts while QtCreator is closed, opening the project seems to work find. You can blow away all the artifacts while QtCreator is open, and then rebuild before closing and everthing works ok.

        1 Reply Last reply
        0

        • Login

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