【问题标题】:Makefile error in Protobuf 2.6.0 (Windows 10 Mingw)Protobuf 2.6.0 (Windows 10 Mingw) 中的 Makefile 错误
【发布时间】:2018-04-09 14:36:47
【问题描述】:

我尝试使用 Mingw 在 Windows 上安装 Protobuf 2.6.0。
命令./configure 有效,它为我提供了一个Makefile,但是当我使用命令mingw32-make 运行Makefile 时出现此错误:

C:\Users\taka\gz-ws\protobuf-2.6.0> mingw32-make

! était inattendu。 //翻译:“!没想到”

Makefile:558: 目标“config.h”的配方失败

mingw32-make: *** [config.h] 错误 255

Makefile 的第 558 行:

config.h: stamp-h1
    @if test ! -f $@; then rm -f stamp-h1; else :; fi
    @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi`

我不知道在这里做什么。

【问题讨论】:

  • 您是否尝试过使用 Msys 制作? mingw32-make 无法访问所有可能导致很多问题的 unix bash。此外,我能够使用包管理器在 msys 上成功安装 protobuf - 你应该能够在那里获得预编译版本。
  • 它醒了,谢谢!
  • 将您的发现作为详细答案发布可能是个好主意。这样,其他 SO 用户可以更轻松地在 MinGW 上设置他们的 Protobuf。
  • 是的,我认为这对遇到同样问题的其他人非常有用!

标签: makefile protocol-buffers


【解决方案1】:

我找到了解决方案。您需要使用 Msys 而不是 MinGW,因为 MinGW 无法访问所有 Unix Bash。 (运行 make 而不是 mingw32-make)

所以它无法识别第 558 行,但 Msys 可以正确读取。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-28
    • 2017-10-05
    • 2020-02-15
    • 2012-10-11
    相关资源
    最近更新 更多