【问题标题】:No rule to make target - Working with Resources in qt Creator没有制定目标的规则 - 在 qt Creator 中使用资源
【发布时间】:2016-05-12 15:13:25
【问题描述】:

我开始使用 qt Creator 并使用带有 qrc-files 的资源系统。我正在使用 Windows 10,我正在使用 qt creator 3.6.1

尝试运行我的项目会导致此错误:mingw32-make[1]: *** No rule to make target '../Game/res/', required by 'debug/qrc_res.cpp'.停下来。

清理项目,运行 qmake,重建全部没有帮助。

Game.pro 看起来不错。指定的图片在他们的位置。我不知道如何解决这个问题。有人可以帮帮我吗?到目前为止,我可以解决此问题的唯一方法是从项目文件夹和项目中删除所有 qrc 文件并再次添加它们(手动)...

我的资源文件res.qrc

<RCC>
    <qresource prefix="/">
        <file>res/1.png</file>
        <file>res/a.png</file>
        <file>res/#.png</file>
    </qresource>
</RCC>

我的Game.prosn-p:

...

RESOURCES += \
    res.qrc \
    maps.qrc

【问题讨论】:

    标签: qt makefile resources qt-creator qmake


    【解决方案1】:

    #.png 的名称导致错误。 # 可能被识别为转义字符!我把它重命名为2.png

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-07-27
      • 1970-01-01
      • 2013-06-14
      • 2011-06-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多