Article View: comp.sys.mac.programmer.codewarrior
Article #1477c++ and including ocidl.h build problem
From: David Alter
Date: Fri, 20 Feb 2004 06:48
Date: Fri, 20 Feb 2004 06:48
48 lines
2367 bytes
2367 bytes
I'm having a problem with compiling c++ and including <ocidl.h> for
windows. I'm using Codewarrior 8.0. When I compiled this project as C
it worked fine. Once I enable C++ I get the following error, and 70 or
so like it.
Error : illegal struct/union/enum/class definition
(included from:
exdisp.h:238
shlguid.h:220
shlobj.h:102
PC_ChooseDialog.cpp:1)
ocidl.h line 566 IConnectionPoint : public IUnknown
Error : illegal struct/union/enum/class definition
(included from:
exdisp.h:238
shlguid.h:220
shlobj.h:102
PC_ChooseDialog.cpp:1)
ocidl.h line 751 IEnumConnectionPoints : public IUnknown
The problem appears to be with the "public IUnknown". If I edit
ocidl.h and comment out the ": public IUnknown" It will get past that
error. I have run it through the preprocessor and this is the output
it generates.
struct
IEnumConnections : public IUnknown
{
public:
virtual HRESULT __stdcall Next(
ULONG cConnections,
LPCONNECTDATA rgcd,
ULONG *pcFetched) = 0;
virtual HRESULT __stdcall Skip(
ULONG cConnections) = 0;
virtual HRESULT __stdcall Reset( void) = 0;
virtual HRESULT __stdcall Clone(
IEnumConnections * *ppEnum) = 0;
};
I would have thought it would have been class and not struct but I
don't think that is the issue. What ever the case I should no be
editing the Win32 .h files. Does anyone know what is going on here and
how I can get around it.
thanks
-dave
Technical Details
Message-ID:
<e4af91cf.0402192248.476671ee@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f635e,6d5d8293494eb1fb,start X-Google-Attributes: gidf635e,public X-Google-Thread: fd047,6d5d8293494eb1fb,start X-Google-Attributes: gidfd047,public X-Google-ArrivalTime: 2004-02-19 22:48:56 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail From: David@alterconsulting.net (David Alter) Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.windows Subject: c++ and including ocidl.h build problem Date: 19 Feb 2004 22:48:56 -0800 Organization: http://groups.google.com Lines: 48 Message-ID: <e4af91cf.0402192248.476671ee@posting.google.com> NNTP-Posting-Host: 216.102.199.85 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1077259736 24444 127.0.0.1 (20 Feb 2004 06:48:56 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 20 Feb 2004 06:48:56 +0000 (UTC)