【问题标题】:make error 2 on Windows when building fastText构建 fastText 时在 Windows 上出现错误 2
【发布时间】:2016-08-07 19:30:28
【问题描述】:

我正在尝试构建 fastText(Facebook 的用于学习单词表示和句子分类的库),并尝试按照他们的 Github 页面上的说明进行操作:

$ git clone git@github.com:facebookresearch/fastText.git $ cd fastText $ make

我安装了 GnuWin32 并添加到路径中以便使用 make 功能。我在 Windows 10 上。

但是我收到以下错误: $ make c++ -pthread -O3 -funroll-loops -std=c++0x -c src/args.cc process_begin: CreateProcess(NULL, c++ -pthread -O3 -funroll-loops -std=c++0x -c src/args.cc, ...) failed. make (e=2): The system cannot find the file specified. make: *** [args.o] Error 2

有人知道如何解决这个问题吗?谢谢!

【问题讨论】:

  • 您的路径中有c++ 吗?尝试输入c++ 看看会发生什么。
  • @Jean-François Fabre 你是对的。我没有它。它说command not found。我按照说明安装了clang。应该够用还是我需要单独安装c++?

标签: makefile build gnu-make


【解决方案1】:

在发布此问题后,Facebook 澄清 FastText 仅在 Mac OS 和 Linux 发行版上构建。见https://github.com/facebookresearch/fastText

【讨论】:

    【解决方案2】:

    我在尝试使用 MinGW 工具在 Windows 上构建 fastText 时遇到了类似的错误。我转而使用 Visual C++ 2015 来构建 fastText,经过一些调整后它运行良好。我为此更改提交了一个拉取请求https://github.com/facebookresearch/fastText/pull/39

    我还为 Windows 维护了 fastText 的二进制构建。你可以在http://cs.mcgill.ca/~mxia3/FastText-for-Windows/找到它

    FastText 的作者目前不支持在 Windows 上构建和运行。曾尝试使用 Bash for Windows 和 MinGW 运行。此非官方版本使用 Visual C++ 2015 编译,可在 Windows 上本地运行

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-06-13
      • 1970-01-01
      • 2016-08-14
      • 2021-01-20
      • 1970-01-01
      • 2013-08-12
      • 2019-12-08
      相关资源
      最近更新 更多