【问题标题】:Make Gnu MP library with minGW: "Nothing to be done for Makefile.in"使用 minGW 制作 Gnu MP 库:“Makefile.in 无需执行任何操作”
【发布时间】:2016-04-23 19:14:23
【问题描述】:

我想在 Windows 上使用 GMP (https://gmplib.org/),所以我下载了名为 gmp-6.1.0 的文件夹并尝试在其上使用 mingw32-make.exe。它打印:“mingw32-make: *** No targets specified and no makefile found. Stop.”但是文件夹中有一个Makefile.in。当我尝试“mingw32.exe Makefile.in”时,它打印出“Makefile.in 无事可做”。

我真的不知道在这里做什么,因为这里有一个人:How to compile makefile using MinGW? 说我只需要 mingw32.exe makefile.in

【问题讨论】:

  • 如 GMP 文档中所述,您应该首先启动“configure”命令以生成最终的 makefile,该文件将命名为“makefile”,以便“mingw32-make”命令能够正常工作。
  • 是的,但是我如何在 Windows 上做到这一点?
  • 好的,我发现我需要 MSYS 来执行此操作。谢谢你的建议。

标签: windows makefile mingw autotools gmp


【解决方案1】:

要安装 GMP,您应该:
1. 安装 MSYS 或 Cygwin(至少带有 Autotools 包和 make 实用程序)
2. 运行“./configure”命令生成makefile,简称为“makefile”
3.运行“make”命令构建
4.运行“make install”安装GMP

【讨论】:

    【解决方案2】:

    所以如果你使用 VscodeMingw 那么你应该首先确保 Mingw 的 bin 文件夹包含在环境path,最好将mingw32-make.exe更改为make以简化任务,然后创建一个makefile并将此代码包含在其中。

    all:
        gcc -o filename filename.c
        ./filename
    

    然后保存 makefile 并打开 Vscode Code 终端并写入make。然后makefile将被执行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-05-19
      • 1970-01-01
      • 1970-01-01
      • 2020-07-11
      • 1970-01-01
      • 2021-12-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多