1
votes

I am trying to compile gnuplot on a Windows 7 x64 machine.

Here are the steps I am following after unpacking the tar.gz for gnuplot 4.6.1:

  1. Open Visual Studio Command Prompt
  2. cd to the directory ..\gnuplot-4.6.1\config\msvc
  3. entering the command "nmake -f Makefile

It runs for a very short period of time, then outputs

...breaders.c<302> : fatal error C1083: Cannot open include file: 'gd.h' : No such file or directory NMAKE : fatal error U1077: ..\VC\BIN\cl.EXE"' : return code '0x2' Stop.

Do I need to install the gd library or remind msvc where gd.h is located? Or something else?

2

2 Answers

0
votes

Well, for users like me, who can't figure out how to unpack the tarball and compile gnuplot, there are platform specific binaries available which handle all of the setup.

http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.0/gp460-win32-setup.exe worked just fine so I can use gnuplot right away and worry about compiling it some time later.

0
votes

It is complicated to install gnuplot in Windows with nmake. There are many libraries that are required by gnuplot, that are intended for using in Unix, such as gd. You could try compile without gd: --nogd, but I think, the build should break because of missing some other libraries.

Downloading installer or prebuilt gnuplot is the best choice.

Gnuplot could be installed under Cygwin like described here.

Some pre-built version of gnuplot are compiled with MinGW. So, you could also try to build gnuplot under mingw.