For those of you trying to get ncview to work under cygwin on windows, I recieved the following useful information from an ncview user:

Just wanted to let you know that ncview1.92e even runs on a WindowsPC under Cygwin with Xfree86. I have used and learned to appreciate Ncview when working on Unix workstations, after I changed jobs I was equipped with a PC but soon installed Xfree86 as a Xwindows server to get some old X programs back. Last week I managed to get Ncview working in this environment.

It needed several attempts, though, and you may want to spread this information among the Ncview-for-WindowsPC community. Two weeks ago I have tried to get Ncview running for the first time, it compiled but crashed right at the start-up with segmentation fault. I tried all possible compiler switches, without success. Last week I upgraded the Cygwin.dll (v. 1.5.4) and then recompiled both the netcdf library and ncview1.92e, and worked. Lesson learned: you need the newest version of cygwin AND need to recompile both netcdf and ncview with the new library.

The configure utility works fine under cygwin, it finds my compilers and creates a proper Makefile. The only problem seems to be the order of X11 libraries. The linker is kind of kinky, it complains that some functions from the SM and ICE libraries cannot be found despite the fact that -lSM and -lICE are correctly stated in the ld line of the Makefile. Anyway, I simply modified the Makefile and added -lSM and -lICE to the XLIB variable, now the linker seems to read them twice but stops complaining. Furthermore, -lXpm seems to be required for Xfree86, so I added this as well. My XLIB definition form the Makefile looks like this:

XLIB = -lXpm -lSM -lICE -lX11

It may not look beautiful, but it works.

That's it, hope this information is useful for others. Take care,


Many thanks to Klaus Wyser of the Rossby Centre/SMHI for this information.