c++ code

Evan Stade estade at gmail.com
Tue May 29 01:09:33 CDT 2007


On 5/28/07, Dmitry Timoshkov <dmitry at codeweavers.com> wrote:
>
> "Evan Stade" <estade at gmail.com> wrote:
>
> > Well the Platform SDK headers use C++.  From gdiplus.h:
> >
> > ...
> >    namespace DllExports
> >    {
> >        #include "GdiplusFlat.h"
> >    };
> > ...
> >
> > And if you try to just include GdiplusFlat.h (i.e . only using the gdi+
> flat
> > api), you have to include GdiplusGpStubs.h. From GdiplusGpStubs.h:
> >
> > ...
> > class GpBrush {};
> > class GpTexture : public GpBrush {};
> > ...
> >
> > So it would be impossible to compile any conformance test for gdi+ in C
> > using the platform sdk headers.  In my eyes it seems that there are 2
> > options: edit the platform sdk headers so that they are compatible with
> C
> > code (change "class GpFoo {};" to "typedef void GpFoo") or use g++ to
> > compile.  Are you suggesting the former over the latter?
>
> All you need are the API prototypes, and you can get those without
> including
> headers that use C++.
>
> --
> Dmitry.
>

The API prototypes use types that are defined as C++ classes.  For example,
one prototype (from GdiPlusFlat.h) is

GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **cloneBrush);

And GpBrush is defined as

class GpBrush {};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-devel/attachments/20070529/2f5f7ac8/attachment.htm


More information about the wine-devel mailing list