【问题标题】:gnuplot Makefile can't find gd.h compiling from Visual Studio 2010 command promptgnuplot Makefile 找不到从 Visual Studio 2010 命令提示符编译的 gd.h
【发布时间】:2012-10-16 20:03:09
【问题描述】:

我正在尝试在 Windows 7 x64 机器上编译 gnuplot。

以下是我在解压 gnuplot 4.6.1 的 tar.gz 后遵循的步骤:

  1. 打开 Visual Studio 命令提示符
  2. cd 到目录..\gnuplot-4.6.1\config\msvc
  3. 输入命令“nmake -f Makefile”

运行很短的时间,然后输出

...breaders.c:致命错误 C1083:无法打开包含文件:'gd.h':没有这样的文件或目录 NMAKE:致命错误 U1077:..\VC\BIN\cl.EXE"':返回代码 '0x2' 停下来。

是否需要安装gd library或提醒msvc gd.h所在的位置?还是别的什么?

【问题讨论】:

    标签: visual-c++ gd gnuplot


    【解决方案1】:

    好吧,对于像我这样不知道如何解压缩 tarball 和编译 gnuplot 的用户,有一些特定于平台的二进制文件可以处理所有设置。

    http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.0/gp460-win32-setup.exe 工作得很好,所以我可以立即使用 gnuplot,而不必担心稍后再编译它。

    【讨论】:

      【解决方案2】:

      使用nmake 在Windows 中安装gnuplot 很复杂。 gnuplot 需要许多库,这些库旨在用于Unix,例如gd。您可以尝试在没有 gd 的情况下进行编译:--nogd,但我认为,由于缺少其他一些库,构建应该会中断。

      下载安装程序或预建gnuplot 是最佳选择。

      Gnuplot 可以像described here 一样安装在 Cygwin 下。

      一些 gnuplot are compiled with MinGW 的预构建版本。 所以,你也可以尝试在mingw下构建gnuplot

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2010-11-10
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多