NO

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

Offline CplEthane

  • Member
  • *
  • Posts: 4
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: 1746
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 »

Offline CplEthane

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