Qbs,不存在基本配置文件错误

时间:2017-09-06 18:01:21

标签: 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"]

1 个答案:

答案 0 :(得分:1)

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