我正在通过编译基于Qt的开源库来学习Qb。我将我的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" }
}
}
我按如下方式调用Qb:
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 config输出中所看到的,您没有名为“ msvc”的配置文件(本手册中的示例假定您已这样做)。请使用现有的其中之一,例如MSVC2017-x64。
关于c++ - Qbs,不存在的基本配置文件错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/46081638/