Pelles C > General discussions

GDIPlus header compilation problems

(1/1)

CplEthane:
Hello,

I've been trying to get the GDIPlus examples by John F ( http://www.johnfindlay.plus.com/pellesc/GdiPlus/GdiPlus.html ) to compile in Pelles C 9.00.9  but am running into problems.  I load the project into Pelles C, and attempt to build, and here is the error readout:

Building main.obj.
C:\GdipTest64\fGdiPlusFlat.h(1072): error #2095: Expected type for parameter 1, but found 'OUT'.
C:\GdipTest64\fGdiPlusFlat.h(1072): warning #2099: Missing type specifier; assuming 'int'.
C:\GdipTest64\fGdiPlusFlat.h(1072): error #2001: Syntax error: expected ')' but found 'ULONG_PTR'.
C:\GdipTest64\fGdiPlusFlat.h(1136): error #2095: Expected type for parameter 1, but found 'OUT'.
C:\GdipTest64\fGdiPlusFlat.h(1136): warning #2099: Missing type specifier; assuming 'int'.
C:\GdipTest64\fGdiPlusFlat.h(1136): error #2001: Syntax error: expected ')' but found 'ULONG_PTR'.
C:\GdipTest64\fGdiPlusFlat.h(1136): error #2001: Syntax error: expected ';' but found 'const'.
C:\GdipTest64\fGdiPlusFlat.h(1136): error #2001: Syntax error: expected ';' but found 'GdiplusStartupOutput'.
C:\GdipTest64\fGdiPlusFlat.h(1136): error #2001: Syntax error: expected ';' but found ')'.
C:\GdipTest64\fGdiPlusFlat.h(3024): error #2095: Expected type for parameter 1, but found 'OUT'.
C:\GdipTest64\fGdiPlusFlat.h(3024): warning #2099: Missing type specifier; assuming 'int'.
C:\GdipTest64\fGdiPlusFlat.h(3024): error #2001: Syntax error: expected ')' but found 'ULONG_PTR'.
C:\GdipTest64\main.c(69): error #2140: Type error in argument 1 to 'GdiplusStartup'; expected 'int' but found 'unsigned long long int *'.
C:\GdipTest64\main.c(69): error #2138: Too many arguments to 'GdiplusStartup'.
C:\GdipTest64\main.c(69): error #2138: Too many arguments to 'GdiplusStartup'.
*** Error code: 1 ***
Done.


I set both MS and Pelles extensions for this project. I also looked around the forum here for similar errors and tried shuffling stdio.h and stdlib.h and the GDIplus header around in main.c to no avail.  What else am I missing?  Thanks!

frankie:
Hello CplEthane, welcome on the forum.
The examples from John's site carry an old version of my fGdiPlusFlat.h header.
To make John's examples work out of the box open the project options dialog, go to compiler tab and in the preprocessor defines add "OUT", or edit 'fGdiPlusFlat.h' and add on top the line:

--- Code: ---#define OUT

--- End code ---

Or download the last version from my GitHub fsdk project.

CplEthane:
Thanks for the quick reply! Everything is working now.

Navigation

[0] Message Index

Go to full version