c++ code

Evan Stade estade at gmail.com
Mon May 28 16:25:29 CDT 2007


On 5/26/07, Alexandre Julliard <julliard at winehq.org> wrote:
>
> "Evan Stade" <estade at gmail.com> writes:
>
> > I want to write conformance tests for gdiplus and that requires the use
> of
> > c++.  Even if I were to focus on the gdi+ flat api, the windows SDK
> headers
> > for that have c++ code in them, also eventually when the gdi+ c++
> wrappers
> > are written on top of the flat api then we will need to be able to
> compile
> > c++ in the wine environment.  What do I have to do to be able to write
> these
> > tests?
>
> I don't see any need to use C++ for that. All the exported APIs are
> callable from C code, and the corresponding headers are C compatible
> too.
>
> --
> Alexandre Julliard
> julliard at winehq.org
>

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?

-Evan Stade
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-devel/attachments/20070528/82bc9136/attachment.html


More information about the wine-devel mailing list