gnuplot Makefile 找不到从 Visual Studio 2010 命令提示符编译的 gd.h

Posted

技术标签:

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

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

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

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

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

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

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

【问题讨论】:

【参考方案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

【讨论】:

以上是关于gnuplot Makefile 找不到从 Visual Studio 2010 命令提示符编译的 gd.h的主要内容,如果未能解决你的问题,请参考以下文章

找不到带有 CATALINA 的 qt 或 x11 终端 gnuplot

LIBPATHS 未在 Makefile 中使用,找不到共享对象

在netbeans中运行makefile时找不到sdl2-config可执行文件

Makefile 错误:/usr/bin/ld: 找不到 -lsqlite3

使用 gnuplot 绘制宽度图

为啥Makefile找不到包含目录