Has anyone built Gnuplot on Windows XP using MinGW.

I'm having trouble. I have successfully built all its dependencies butam stuck with the rest.

When using the provided mingw makefile (and making the appropriate adjustments for it's dependencies) I still get the below error.

It seems to be looking for a file in LibGD but I have no idea why it can't see it. Libgd built successfully.

My error's are below.

Code:
xxxx@XXXX-E0A0BDAF9E /c/gnuplot/config/mingw
$ make all
make TARGET=gnuplot.exe gnuplot.exe
make[1]: Entering directory `/c/gnuplot/config/mingw'
g++ -c  -o wgdiplus.co ../../src/win/wgdiplus.cpp
../../src/win/wgdiplus.cpp:30:21: error: gdiplus.h: No such file or directory
../../src/win/wgdiplus.cpp:32: error: 'Gdiplus' is not a namespace-name
../../src/win/wgdiplus.cpp:32: error: expected namespace-name before ';' token
../../src/win/wgdiplus.cpp: In function 'void gdiplusInit()':
../../src/win/wgdiplus.cpp:42: error: 'GdiplusStartupInput' was not declared in this scope
../../src/win/wgdiplus.cpp:42: error: expected ';' before 'gdiplusStartupInput'
../../src/win/wgdiplus.cpp:43: error: 'gdiplusStartupInput' was not declared in this scope
../../src/win/wgdiplus.cpp:43: error: 'GdiplusStartup' was not declared in this scope
../../src/win/wgdiplus.cpp: In function 'void gdiplusCleanup()':
../../src/win/wgdiplus.cpp:52: error: 'GdiplusShutdown' was not declared in this scope
../../src/win/wgdiplus.cpp: At global scope:
../../src/win/wgdiplus.cpp:57: error: 'Color' does not name a type
../../src/win/wgdiplus.cpp:66: error: expected initializer before '*' token
../../src/win/wgdiplus.cpp: In function 'void gdiplusLineEx(HDC__*, POINT, POINT, UINT, float, COLORREF)':
../../src/win/wgdiplus.cpp:90: error: 'Graphics' was not declared in this scope
../../src/win/wgdiplus.cpp:90: error: expected ';' before 'graphics'
../../src/win/wgdiplus.cpp:95: error: 'graphics' was not declared in this scope
../../src/win/wgdiplus.cpp:95: error: 'SmoothingModeAntiAlias' was not declared in this scope
../../src/win/wgdiplus.cpp:97: error: 'Pen' was not declared in this scope
../../src/win/wgdiplus.cpp:97: error: 'pen' was not declared in this scope
../../src/win/wgdiplus.cpp:97: error: 'gdiplusCreatePen' was not declared in this scope
../../src/win/wgdiplus.cpp:98: error: 'graphics' was not declared in this scope
../../src/win/wgdiplus.cpp:99: error: type '<type error>' argument given to 'delete', expected pointer
../../src/win/wgdiplus.cpp: In function 'void gdiplusPolylineEx(HDC__*, POINT*, int, UINT, float, COLORREF)':
../../src/win/wgdiplus.cpp:112: error: 'Graphics' was not declared in this scope
../../src/win/wgdiplus.cpp:112: error: expected ';' before 'graphics'
../../src/win/wgdiplus.cpp:117: error: 'graphics' was not declared in this scope
../../src/win/wgdiplus.cpp:117: error: 'SmoothingModeAntiAlias' was not declared in this scope
../../src/win/wgdiplus.cpp:119: error: 'Pen' was not declared in this scope
../../src/win/wgdiplus.cpp:119: error: 'pen' was not declared in this scope
../../src/win/wgdiplus.cpp:119: error: 'gdiplusCreatePen' was not declared in this scope
../../src/win/wgdiplus.cpp:120: error: 'Point' was not declared in this scope
../../src/win/wgdiplus.cpp:120: error: 'points' was not declared in this scope
../../src/win/wgdiplus.cpp:120: error: expected type-specifier before 'Point'
../../src/win/wgdiplus.cpp:120: error: expected ';' before 'Point'
../../src/win/wgdiplus.cpp:125: error: 'graphics' was not declared in this scope
../../src/win/wgdiplus.cpp:126: error: type '<type error>' argument given to 'delete', expected pointer
../../src/win/wgdiplus.cpp:127: error: type '<type error>' argument given to 'delete', expected pointer
../../src/win/wgdiplus.cpp: In function 'void gdiplusSolidFilledPolygonEx(HDC__*, POINT*, int, COLORREF, double)':
../../src/win/wgdiplus.cpp:134: error: 'Graphics' was not declared in this scope
../../src/win/wgdiplus.cpp:134: error: expected ';' before 'graphics'
../../src/win/wgdiplus.cpp:135: error: 'graphics' was not declared in this scope
../../src/win/wgdiplus.cpp:135: error: 'SmoothingModeAntiAlias' was not declared in this scope
../../src/win/wgdiplus.cpp:137: error: 'Color' was not declared in this scope
../../src/win/wgdiplus.cpp:137: error: expected ';' before 'gdipColor'
../../src/win/wgdiplus.cpp:138: error: 'Point' was not declared in this scope
../../src/win/wgdiplus.cpp:138: error: 'points' was not declared in this scope
../../src/win/wgdiplus.cpp:138: error: expected type-specifier before 'Point'
../../src/win/wgdiplus.cpp:138: error: expected ';' before 'Point'
../../src/win/wgdiplus.cpp:143: error: 'SolidBrush' was not declared in this scope
../../src/win/wgdiplus.cpp:143: error: expected ';' before 'brush'
../../src/win/wgdiplus.cpp:144: error: 'brush' was not declared in this scope
../../src/win/wgdiplus.cpp:145: error: type '<type error>' argument given to 'delete', expected pointer
../../src/win/wgdiplus.cpp: In function 'void gdiplusPatternFilledPolygonEx(HDC__*, POINT*, int, COLORREF, double, COLORREF, BOOL, int)
':
../../src/win/wgdiplus.cpp:152: error: 'Graphics' was not declared in this scope
../../src/win/wgdiplus.cpp:152: error: expected ';' before 'graphics'
../../src/win/wgdiplus.cpp:153: error: 'graphics' was not declared in this scope
../../src/win/wgdiplus.cpp:153: error: 'SmoothingModeAntiAlias' was not declared in this scope
../../src/win/wgdiplus.cpp:155: error: 'Color' was not declared in this scope
../../src/win/wgdiplus.cpp:155: error: expected ';' before 'gdipColor'
../../src/win/wgdiplus.cpp:156: error: expected ';' before 'gdipBackColor'
../../src/win/wgdiplus.cpp:157: error: 'Brush' was not declared in this scope
../../src/win/wgdiplus.cpp:157: error: 'brush' was not declared in this scope
../../src/win/wgdiplus.cpp:159: error: 'HatchStyle' does not name a type
../../src/win/wgdiplus.cpp:165: error: expected type-specifier before 'SolidBrush'
../../src/win/wgdiplus.cpp:165: error: expected ';' before 'SolidBrush'
../../src/win/wgdiplus.cpp:168: error: expected type-specifier before 'SolidBrush'
../../src/win/wgdiplus.cpp:168: error: expected ';' before 'SolidBrush'
../../src/win/wgdiplus.cpp:171: error: expected type-specifier before 'HatchBrush'
../../src/win/wgdiplus.cpp:171: error: expected ';' before 'HatchBrush'
../../src/win/wgdiplus.cpp:173: error: 'Point' was not declared in this scope
../../src/win/wgdiplus.cpp:173: error: 'points' was not declared in this scope
../../src/win/wgdiplus.cpp:173: error: expected type-specifier before 'Point'
../../src/win/wgdiplus.cpp:173: error: expected ';' before 'Point'
../../src/win/wgdiplus.cpp:179: error: type '<type error>' argument given to 'delete', expected pointer
../../src/win/wgdiplus.cpp:180: error: type '<type error>' argument given to 'delete', expected pointer
../../src/win/wgdiplus.cpp: In function 'void gdiplusCircleEx(HDC__*, POINT*, int, UINT, float, COLORREF)':
../../src/win/wgdiplus.cpp:187: error: 'Graphics' was not declared in this scope
../../src/win/wgdiplus.cpp:187: error: expected ';' before 'graphics'
../../src/win/wgdiplus.cpp:188: error: 'graphics' was not declared in this scope
../../src/win/wgdiplus.cpp:188: error: 'SmoothingModeAntiAlias' was not declared in this scope
../../src/win/wgdiplus.cpp:190: error: 'Pen' was not declared in this scope
../../src/win/wgdiplus.cpp:190: error: 'pen' was not declared in this scope
../../src/win/wgdiplus.cpp:190: error: 'gdiplusCreatePen' was not declared in this scope
../../src/win/wgdiplus.cpp:192: error: type '<type error>' argument given to 'delete', expected pointer
make[1]: *** [wgdiplus.co] Error 1
make[1]: Leaving directory `/c/gnuplot/config/mingw'
make: *** [console] Error 2