问题标签 [qbs]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
2974 浏览

qt - Qbs 构建规则如何使用产品

我想使用 Qbs 来编译一个现有的项目。这个项目已经包含了一个在这个项目中大量使用的代码转换工具(my_tool)。

到目前为止,我有(简化):

如何获取对命令的 my_tool 的引用?

0 投票
1 回答
1722 浏览

build - QBS 中的构建后步骤

我正在尝试将 nRF51822(Arm Cortex 微控制器)构建过程MakeQBS. 我的编译过程正常(很多硬编码路径,但我稍后会修复)。但是,最后一步是使用将链接器生成的文件objcopy转换为文件。我不知道如何让我的规则运行,除了制作另一个这样的规则(效果不太好):.out.hexApplication

CppApplication是否可以在 s而不是像这样的两个s中有一个 post-link 步骤ApplicationApplication我最好用我自己的 s定义一个全新Rule的用于编译和链接吗?

还有一个额外的问题,是否可以在 QBS 文件中指定“运行”可执行文件,以便当我在 QtCreator 中单击运行时,它实际上会运行 nrfjprog.exe 并将代码闪存到芯片上?(您可以在 IDE 中执行此操作,但我希望能够在 QBS 文件中执行此操作。)

0 投票
1 回答
751 浏览

qt - Qt、Qbs:自动生成moc_Filename.cpp

所以我有一个 Q_OBJECT 标记类,它需要预先生成的 .moc 才能使用。

在我的 .qbs 文件中,我有一个CppApplication项目;这似乎是错误的项目类型,因为 qbs 没有调用moc ClassName.cpp为我生成 moc。应该使用什么来代替/调整?

-

所以我知道 Qt.core 依赖项,但它不适用于我安装的 Qt 残缺;当我试图修复它时,这些事实出现了:

  • 需要检测 Qt 工具链 ( qbs-setup-qt) 并调用qbs-config-ui
  • Qbs 确实将构建规则存储在 core.qbs 中,通过 Qt/core 依赖项链接。
    • 可以将构建规则复制/粘贴到我自己的 .qbs 文件中并避免外部依赖;我认为这是在真正瘫痪的构建系统上部署代码的肮脏黑客(现在我对 Gentoo 上的 Qt 支持有了一个词)。
0 投票
0 回答
3606 浏览

qt - 如何使用 Qbs 通过 Qt Creator 构建 Qt 应用程序?

我正在尝试使用 Qt Creator 构建基于 qbs 的 Qt 应用程序,但出现以下错误:

这是我的 Qbs 项目:

我在任何地方都找不到如何为 Qt 应用程序编写适当的 Qbs 项目的工作示例。

0 投票
1 回答
2756 浏览

qt - 如何将 DLL 添加到 Qbs 项目

我已经生成了一个 DLL 文件。

我有一个有效的 Qbs 项目。

如何将 DLL 文件添加到我的项目中,以便我可以访问库的功能?

0 投票
1 回答
561 浏览

android - 使用 qbs 构建 qt 应用程序

我想知道在 linux 上使用 qbs 为 android 编译、构建和创建 Qt 应用程序的步骤。我有所有必要的工具,目前我可以使用 qmake 创建一个 apk。

0 投票
1 回答
591 浏览

qt - 为什么qbs忽略我的规则?

我有这个简单的代码

并放两个文件blink.q 和blink1.q

通过文档,我必须在“编译输出”窗口中看到 3 行:两行带有“QFile Passing”,另一行带有“QFile 转换器”

但我看到只有 Transformer 块有效(根本没有“QFile Passing”);(我的规则有什么问题?

0 投票
2 回答
785 浏览

qt-creator - Qbs:如何运行简单的终端命令?

我习惯使用 Makefiles,但我当前的项目使用.qbs文件。如何在不创建或不需要文件的情况下通过 qbs 运行简单的终端命令?类似于 make 中的虚假规则。

以下工作并在我的终端中显示“很棒”。

但是,我必须TEST.c在每次运行之前触摸我的虚拟文件。如果没有helloworld依赖关系,则规则不会运行。

有任何想法吗?非常感谢!

0 投票
2 回答
552 浏览

qt - QtCreator + Qbs + IAR

我有一个旧 IAR 版本的项目,基本上我想使用 QtCreator 来编辑和构建项目。IAR 有一个定制的编译器和链接器。它是CR16平台,所以我的案例真的很不寻常。如何归档这个目标?

我已经尝试了 qbs,但它对我不起作用。据我了解,它仅适用于 gcc 编译器,我不知道如何配置它。我还配置了一个编译器https://drive.google.com/file/d/0BxgcZhMUJY8_NHh1SlduZENkTFk/view并制作了一个工具包https://drive.google.com/file/d/0BxgcZhMUJY8_dFp3dFlRSnJnMm8/view

在这一点上,我不需要调试器支持,只需要构建,支持构建配置,我可以在构建中包含或排除文件,并从构建中查看错误。

我尝试导入通用项目,但这不是我需要的,它只是一个带有一些奇怪语法错误的代码编辑器(我在 IAR 中没有这样的错误)。所以我认为我需要 qbs 或 cmake 项目并将所有内容导入其中。

我通过这个链接http://habrahabr.ru/post/258467/阅读了信息,可能还有关于 Qt baremetal + gcc 编译器的所有信息。但是我没有找到任何关于如何使用非 gcc 编译器以及如何为它配置 Qt 的信息。

0 投票
1 回答
1145 浏览

qt-creator - Qbs does not add Qt libraries when linking application

I installed VS2015 and QtCreator 3.5 and compiled Qt5.5 from source as a binary distribution is not available for the visual c++ compiler shipped with VS2015.

I tried to compile my project which was developed using the visual c++ compilers from VS2012/VS2013 and QtCreator 3.3x with Qt 5.2 and Qbs - on a different machine - from QtCreator and with my new setup neither QtCreator nor Qbs from command line are able to link the application.

I narrowed the problem down using the Qbs helloworld example

Which gives the following output when building with qbs from the command line

Rather cryptic so I'll highlight the problem from the above output

So the empty .lib file is the problem.

Comparing the linker statement with that from the other machine, the empty .lib is at the same position where Qt5Core.lib should be. Thus tried to investigate why Qbs does not resolve the paths proberly; I looked at the core.qbs module but couldn't find anything different from the file on the machine with the working setup. Finally I decided to recompile the Qt library and setup the Qbs/QtCreator profiles from scratch. Done and it worked, until I restarted QtCreator, now neither (Qbs from command line, nor QtCreator with its own profile) works anymore.

Has somebody experienced such a behavior?