You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

Windows 7下Qt Creator 4.6.0配置求助:构建时make命令错误

Fixing Qt Creator 4.6.0 Configuration & Build Errors on Windows 7

Hey there! I’ve helped tons of new Qt users work through this exact issue—let’s break it down step by step to get you up and running.

1. Why You’re Seeing the "make" Command Error

The error Could not determine which "make" command to run happens because Qt Creator can’t find a valid build toolchain. On Windows, Qt relies on either MinGW (a lightweight, easy-to-configure toolchain) or MSVC (tied to Visual Studio). For beginners, MinGW is usually the simpler pick.

First, confirm you have MinGW installed:

  • If you skipped it during Qt setup, re-run the Qt installer and check the box for a MinGW version compatible with Qt Creator 4.6.0 (this pairs with Qt 5.11.x, so look for MinGW 5.3.0 32-bit/64-bit, matching your Windows 7 system architecture).
  • Once installed, navigate to your MinGW folder (e.g., C:\Qt\Qt5.11.3\Tools\mingw530_32\bin)—you’ll find mingw32-make.exe here, which is Qt’s equivalent of "make".

2. Configuring Build & Run in Qt Creator

Head to Tools > Options > Build and Run and set up these three tabs:

a. Kits (The Most Critical Part)

Kits tie together your Qt version, compiler, and build tools into a single usable setup:

  • Click Add and select Desktop as the kit type.
  • Name it something clear, like MinGW 5.3.0 32-bit.
  • Under Qt Version, pick the Qt 5.11.x version you installed (if it’s missing, jump to the Qt Versions tab below).
  • For Compiler, select the corresponding MinGW GCC and G++ compilers (e.g., MinGW 5.3.0 32-bit gcc and g++).
  • In Make command, browse to the mingw32-make.exe file in your MinGW bin folder.

b. Qt Versions

If your Qt version isn’t listed:

  • Click Add, then navigate to C:\Qt\Qt5.11.3\5.11.3\mingw53_32\bin\qmake.exe (adjust the path to match your install) and select it. Qt Creator will auto-detect the version.

c. Compilers

If MinGW compilers don’t show up:

  • Click Add > GCC, then select gcc.exe from your MinGW bin folder (this is the C compiler). Repeat for g++ (the C++ compiler), naming each with their version for clarity.

3. Test the Configuration

  • Go back to your project’s Build & Run settings (left sidebar of the project window) and select the kit you just created.
  • Click Clean to wipe any broken build files, then hit Build All. The "make" error should be gone, and your project should compile normally.

Quick Bonus Tip

If you’d prefer using MSVC instead, install Visual Studio 2017 (the latest version compatible with Qt 5.11.x and Windows 7) and make sure to check the "Desktop development with C++" workload during setup. Qt Creator will automatically detect MSVC’s nmake.exe tool once VS is installed.

内容的提问来源于stack exchange,提问作者DisplayName001

火山引擎 最新活动