Fri Sep 11 09:29:00 GMT 1998
On 10 Sep 98, at 16:21, the Illustrious Mumit Khan wrote:
> On Wed, 9 Sep 1998, Paul Garceau wrote:
> > The latter, C++ mangling. EGCS-1.0.2-Mingw32 is looking for
> > IDirectDraw::SetCooperativeLevel. Headers can only understand
> > IDirectDraw->SetCooperativeLevel.
> Hmmm ... the two are completely incompatible in C++, so I don't what it's
> trying to do.
Yes. egcs-1.0.2-mingw32 is attempting to map to a C++ class member
(IDirectDraw::SetCooperativeLevel(int,dword)) defined within the actual 3d
Renderer source code to something that it can understand and reference via
the ddraw.h header file. The ddraw.h file has no C++ classes references in it.
However, it is set up to handle C typedef struct member references
such as IDirectDraw->SetCooperativeLevel(int,dword).
Thus, if I define the IDirectDraw struct, I should be able to make the
ddraw.h call. So, if I can manage to disable the C++ name mangling, it
seems that I should be able to access the IDirectDraw struct that I do have
by using the predefined variables in the C++ source code.
> Also, note that MS provides a mechanism for accessing all their C++ APIs
> using C only. I don't know much about it, but I know others have used it
> (and I thought you are one of those people).
Yes, I am. However, the method has yet to proove that it is either a)
reliable or b) consistent. Also, I am doing my primary porting using EGCS-
1.0.2-mingw32 and am not using any MS tools.
> Anyway, please send me a snippet of code so I know what you're asking.
class SysGraphics2d:public CSGraphics2d
static LPDIRECTDRAW lpDD;
SysGraphics2D::SysGraphics2D(int argc, char* argv) : csGraphics2D ()
ddrval = lpDD->SetCooperativeLevel (NULL, DDSCL_NORMAL);
Ok, note the lpDD->SetCooperativeLevel(...) reference above; this is a C
syntax reference to IDirectDraw, which is included in the ddraw.h file.
EGCS-1.0.2-Mingw32 translates the call to:
ddrval = IDirectDraw::SetCooperativeLevel(NULL, DDSCL_NORMAL);
which is a C++ class::<member reference> (as far as I can tell).
The questions are:
"How can I force a C++ source code line of symbols to not be submitted
to the C++ name mangling process?"
"What are the other alternatives, if any?"
Hope this helps.
Information Systems Consultant
For help on using this list (especially unsubscribing), send a message to
"email@example.com" with one line of text: "help".
More information about the Cygwin