NO

Author Topic: GDIPlus header compilation problems  (Read 3353 times)

CplEthane

  • Guest
GDIPlus header compilation problems
« on: May 06, 2020, 07:22:18 PM »
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!

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: GDIPlus header compilation problems
« Reply #1 on: May 06, 2020, 10:28:58 PM »
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: [Select]
#define OUT

Or download the last version from my GitHub fsdk project.
« Last Edit: May 07, 2020, 11:55:33 AM by frankie »
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

CplEthane

  • Guest
Re: GDIPlus header compilation problems
« Reply #2 on: May 06, 2020, 11:13:38 PM »
Thanks for the quick reply! Everything is working now.