【问题标题】:LimeReport compilation: Error 127. What causes this?LimeReport 编译:错误 127。这是什么原因造成的?
【发布时间】:2021-12-30 17:57:54
【问题描述】:

我正在尝试使用 Qt 5.5.9 和 Qt Creator 4.11.0 在 Windows 10 中编译 LimeReport。我得到以下编译输出并且编译停止。

/usr/bin/sh: I:\Programs\Qt\Qt5.9.9\5.9.9\mingw53_32\bin\lupdate.exe: command not found
Makefile.Debug:762: recipe for target 'ts' failed
mingw32-make[2]: *** [ts] Error 127
mingw32-make[2]: *** Waiting for unfinished jobs....
mingw32-make[2]: Leaving directory 'E:/Software/C-CPP Windows GUI Programming/Qt/Plugins + Libs/LimeReport/build-limereport-Desktop_Qt_5_9_9_MinGW_32bit-Debug/limereport'
Makefile:36: recipe for target 'debug' failed
mingw32-make[1]: Leaving directory 'E:/Software/C-CPP Windows GUI Programming/Qt/Plugins + Libs/LimeReport/build-limereport-Desktop_Qt_5_9_9_MinGW_32bit-Debug/limereport'
mingw32-make[1]: *** [debug] Error 2
Makefile:89: recipe for target 'sub-limereport-make_first-ordered' failed
mingw32-make: *** [sub-limereport-make_first-ordered] Error 2
11:20:35: The process "I:\Programs\Qt\Qt5.9.9\Tools\mingw530_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project limereport (kit: Desktop Qt 5.9.9 MinGW 32bit)
When executing step "Make"

lupdate.exe 非常多地存在于目录“I:\Programs\Qt\Qt5.9.9\5.9.9\mingw53_32\bin”中。该目录是 PATH 变量的一部分,在 cmd 中输入“lupdate”即可。

请告诉我问题出在哪里以及我是否做错了什么。

注意:我从官方 GitHub 页面下载了源代码,源代码在 Linux 中可以正确编译。我的 Windows 中的 Qt 安装可以正确编译所有其他程序,没有任何问题。

【问题讨论】:

  • 从你的 PATH 中移除 msys 的东西并重新开始。
  • 我在 PATH 上没有任何 msys 的东西。我什至尝试再次重新安装 Qt,即使是全新安装也报告相同的错误!

标签: c++ qt makefile report lime


【解决方案1】:

您正在使用调用 POSIX shell (/bin/sh) 的 make 版本,而不是 Windows cmd.exe shell。

在 POSIX 中,反斜杠始终是转义字符,目录由正斜杠 (/) 而非反斜杠分隔。

在您的 makefile 中某处您已将变量设置为路径 I:\Programs\Qt\Qt5.9.9\5.9.9\mingw53_32\bin\lupdate.exe 或其中的某个部分:将反斜杠替换为正斜杠。

通常,在 makefile 中,您应该始终使用正斜杠作为目录分隔符。

【讨论】:

  • 疯狂科学家,谢谢你的回答。我会试试这个并告诉你。
  • 我在 make 文件或 pro 文件中找不到任何提到 I:\Programs\Qt\Qt5.9.9\5.9.9\mingw53_32\bin\lupdate.exe 的行。因此,在limereport/limereport/limereport.pro 文件中,我禁用了ts.commands = $$LUPDATE \"$$PWD\" -noobsolete -ts $$TRANSLATIONS 行和qm.commands += $$LRELEASE -removeidentical $$tsfile -qm $$qmfile $$escape_expand(\\n\\t) 行,它编译正确。我不想要任何翻译,所以我不在乎禁用上述行。这不是永久修复,但绝对可以解决。
  • 那些是引用环境变量,而不是 make 变量,所以这些路径必须来自您环境中设置的变量。
  • 我是否应该将其添加为单独的答案并将其标记为已接受?
【解决方案2】:

好的,我曾经使用以下解决方法来解决此问题:

我在 make 文件或 pro 文件中找不到任何提到 I:\Programs\Qt\Qt5.9.9\5.9.9\mingw53_32\bin\lupdate.exe 的行。因此,在limereport/limereport/limereport.pro 文件中,我禁用了ts.commands = $$LUPDATE \"$$PWD\" -noobsolete -ts $$TRANSLATIONS 行和qm.commands += $$LRELEASE -removeidentical $$tsfile -qm $$qmfile $$escape_expand(\\n\\t) 行并正确编译。我不想要任何其他语言的翻译,所以我不在乎禁用上述行。这不是永久修复,但绝对是一种解决方法。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-12-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-07
    相关资源
    最近更新 更多