|
From: Allin C. <cot...@wf...> - 2013-08-15 13:55:11
|
Follow-up to my posting of July 24: I now have a mingw64 build of gnuplot that works correctly on Windows 8. Encouraged by this I'm re-posting my patch set. It's smaller this time because I'm skipping the changes that Ethan (very reasonably) didn't like. (These were designed to hush compiler warnings stemming from a perverse Microsoft API rather than any real problem in the gnuplot code.) All my changes are bracketed by ifdef _WIN64, so they shouldn't affect any other builds. Besides patches to the C code I had to do two things to get a working build for Windows 8: 1) The file win/wgnuplot.exe.manifest specifies the processorArchitecture as "X86". For an x86_64 build this must be changed to "amd64" (or wgnuplot.exe won't start). The manifest file is included by win/wgnuplot.rc. I've modified wgnuplot.rc so that it includes an alternative manifest file, wgnuplot.exe.manifest64, if the symbol _WIN64 is defined. (The alternative file simply substitutes "amd64" for "X86" in two places. To support ming64, wgnuplot.exe.manifest64 should be added to the repository.) 2) For the symbols needed for HTML Help support, I tried using a 64-bit version of htmlhelp.lib from the current Windows SDK. The linker choked on this, with some weird error messages. Googling reveals that htmlhelp.lib is some sort of glue or shim, and the real business is done by hhctrl.ocx. So I took a copy of the 64-bit hhctrl.ocx from Windows 8, used pexports to create a .def file, then used mingw64's dlltool to create an import library, hhctrl.dll.a. I modified the mingw Makefile, substituting "-lhhctrl.dll" for "-lhtmlhelp". The linker was then happy and HTML help works OK. There's nothing in my patch set pertaining to point 2), at this point it's just a heads-up for anyone trying a mingw64 build. -- Allin Cottrell Department of Economics Wake Forest University, NC |