Windows 7下Qt Creator 4.6.0配置求助:构建时make命令错误
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 findmingw32-make.exehere, 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
Addand selectDesktopas 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 theQt Versionstab below). - For
Compiler, select the corresponding MinGW GCC and G++ compilers (e.g.,MinGW 5.3.0 32-bit gccandg++). - In
Make command, browse to themingw32-make.exefile in your MinGWbinfolder.
b. Qt Versions
If your Qt version isn’t listed:
- Click
Add, then navigate toC:\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 selectgcc.exefrom your MinGWbinfolder (this is the C compiler). Repeat forg++(the C++ compiler), naming each with their version for clarity.
3. Test the Configuration
- Go back to your project’s
Build & Runsettings (left sidebar of the project window) and select the kit you just created. - Click
Cleanto wipe any broken build files, then hitBuild 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




