c++ - Qbs,不存在的基本配置文件错误

标签 c++ qt qbs

我正在通过编译基于 Qt 的开源库来学习 Qbs。我将我的 Qbs 项目设置如下。

import qbs 1.0

Project {
    Product {
        name: "communi"
        type: "dynamiclibrary"

        files: [
            "include/IrcCore/irc.h",
            "include/IrcCore/irccommand.h",
             ... ,
            "src/util/irccommandqueue.cpp",
            "src/util/irccompleter.cpp",
            "src/util/irclagtimer.cpp",
            "src/util/ircpalette.cpp",
            "src/util/irctextformat.cpp",
            "src/util/irctoken.cpp",
            "src/util/ircutil.cpp"
        ]

        Depends { name: "cpp" }
        Depends { name: "Qt.core" }
        Depends { name: "Qt.widgets" }
    }
}

我按如下方式调用 Qbs;

qbs build profile:qt

得到下面的错误信息

ERROR: Profile "qt" has a non-existent base profile "msvc".

我做错了什么?我按照手册中的说明进行了配置。 我在 Windows 10 x64 上,使用 Qbs 1.9 和 Qt 5.9.1。

我的个人资料列表如下;

>> qbs config --list profiles
profiles.MSVC2017-x64.cpp.compilerVersion: "19.11.25507"
profiles.MSVC2017-x64.cpp.toolchainInstallPath: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/HostX64/x64"
profiles.MSVC2017-x64.qbs.architecture: "x86_64"
profiles.MSVC2017-x64.qbs.targetOS: "windows"
profiles.MSVC2017-x64.qbs.toolchain: "msvc"
profiles.MSVC2017-x64_x86.cpp.compilerVersion: "19.11.25507"
profiles.MSVC2017-x64_x86.cpp.toolchainInstallPath: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/HostX64/x86"
profiles.MSVC2017-x64_x86.qbs.architecture: "x86"
profiles.MSVC2017-x64_x86.qbs.targetOS: "windows"
profiles.MSVC2017-x64_x86.qbs.toolchain: "msvc"
profiles.MSVC2017-x86.cpp.compilerVersion: "19.11.25507"
profiles.MSVC2017-x86.cpp.toolchainInstallPath: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/HostX86/x86"
profiles.MSVC2017-x86.qbs.architecture: "x86"
profiles.MSVC2017-x86.qbs.targetOS: "windows"
profiles.MSVC2017-x86.qbs.toolchain: "msvc"
profiles.MSVC2017-x86_x64.cpp.compilerVersion: "19.11.25507"
profiles.MSVC2017-x86_x64.cpp.toolchainInstallPath: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/HostX86/x64"
profiles.MSVC2017-x86_x64.qbs.architecture: "x86_64"
profiles.MSVC2017-x86_x64.qbs.targetOS: "windows"
profiles.MSVC2017-x86_x64.qbs.toolchain: "msvc"
profiles.qt.baseProfile: "msvc"
profiles.qt.preferences.qbsSearchPaths: "C:/Users/tembo/AppData/Roaming/QtProject/qbs/1.9.0/profiles/qt"
profiles.x86_64-w64-mingw32.cpp.toolchainInstallPath: "C:/MinGW/bin"
profiles.x86_64-w64-mingw32.qbs.targetOS: "windows"
profiles.x86_64-w64-mingw32.qbs.toolchain: ["mingw", "gcc"]

最佳答案

正如您在粘贴的 qbs 配置输出中看到的那样,您没有名为“msvc”的配置文件(手册中的示例假定您有)。请使用现有的一种,例如 MSVC2017-x64。

关于c++ - Qbs,不存在的基本配置文件错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46081638/

相关文章:

c++ - 运算符<< 和运算符>> 重载函数

c++ - Linux C++ Qt 修复 "QIODevice::write: ReadOnly device"?

c++ - 如何在Qt5中播放声音(移植Qt4)?

c++ - 如何确定 boost::variant 变量是否为空?

c++ - directshow 在 C++ 控制台应用程序中禁用 activemovie 窗口

android - 如何在真实设备上调试 Android native 代码

c++ - 在 C++ 中更改 QML font.pointSize

c++ - 将使用 QML、QBS 构建的 Qt 应用程序部署到 Windows

build - QBS 中的构建后步骤