【问题标题】:qmake on mingw creates windows-style path within Makefilemingw 上的 qmake 在 Makefile 中创建 Windows 样式的路径
【发布时间】:2018-01-23 10:04:43
【问题描述】:

我在 Mingw64/MSYS 中使用 qmake。

在 pro 文件中,我需要引用相对路径 (DESTDIR=../bin),以便正确放置测试用例可执行文件。

运行 make check 目标时,生成的 Makefile 代码包含 带有 Windows 路径符号的行:

cd ..\bin && /C/Projects/tests/Testcase/src/target_wrapper.sh  ./Testcase.exe

更改为 ..\bin 将失败,因为 ..bin 未找到:

/bin/sh: Zeile 0: cd: ..bin: No such file or directory

我找不到 qmake 混合 windows 和 *nix 表示法的原因。

【问题讨论】:

    标签: makefile mingw qmake mingw-w64


    【解决方案1】:

    qmake 是特定于目标的。对于您配置的每个目标(例如 Mingw64、msvc2015_32、msvc2013_64、),都有不同的 qmake 安装。听起来您正在执行针对 Windows (MSCV) 的 qmake 而不是 Mingw64 版本。您可能需要通过指定完整路径来显式调用正确的版本。

    【讨论】:

      【解决方案2】:

      我的问题是由mingw应用的补丁引起的:

      https://github.com/Alexpux/MSYS2-packages/issues/1117

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-05-27
        • 2019-01-08
        相关资源
        最近更新 更多