c++.mfc - Compiler error help needed
- Andy C (19/19) Jan 15 2004 I searched for a compiler switch I might be missing but with no luck so ...
I searched for a compiler switch I might be missing but with no luck so I thought I woud post. I am using the latest version. When I try to compile the following: #include <afxctl.h> void func() { int i = 0; } I get the following errors: Error: C:\DM\BIN\..\include\win32\objidl.h(358): forward referenced class 'IUnknown' cannot be a base class Error: C:\DM\BIN\..\include\win32\objidl.h(615): forward referenced class 'IUnknown' cannot be a base class Error: C:\DM\BIN\..\include\win32\objidl.h(821): forward referenced class 'IUnknown' cannot be a base class Error: C:\DM\BIN\..\include\win32\objidl.h(1183): forward referenced class 'IUnknown' cannot be a base class Thanks! Andy C.
Jan 15 2004
I just tried it and it works. Perhaps your INCLUDE environment variable isn't set right? "Andy C" <Andy_member pathlink.com> wrote in message news:bu6b06$2dtm$1 digitaldaemon.com...I searched for a compiler switch I might be missing but with no luck so I thought I woud post. I am using the latest version. When I try to compile the following: #include <afxctl.h> void func() { int i = 0; } I get the following errors: Error: C:\DM\BIN\..\include\win32\objidl.h(358): forward referenced class 'IUnknown' cannot be a base class Error: C:\DM\BIN\..\include\win32\objidl.h(615): forward referenced class 'IUnknown' cannot be a base class Error: C:\DM\BIN\..\include\win32\objidl.h(821): forward referenced class 'IUnknown' cannot be a base class Error: C:\DM\BIN\..\include\win32\objidl.h(1183): forward referenced class 'IUnknown' cannot be a base class Thanks! Andy C.
Jan 16 2004
Walter, This is what I am using: c:\dm\bin\dmc cctest.cpp -cpp -c -Aa -HO -D_DEBUG=1 -D_MBCS=1 -D_X86_=1 -D_MT=1 -IC:\dm\mfc\INCLUDE -IC:\dm\INCLUDE CCTest.CPP is: // cctest.cpp #include <afxctl.h> void func() { int i = 0; } Thanks - Andy In article <bu93m4$12cv$3 digitaldaemon.com>, Walter says...I just tried it and it works. Perhaps your INCLUDE environment variable isn't set right? "Andy C" <Andy_member pathlink.com> wrote in message news:bu6b06$2dtm$1 digitaldaemon.com...I searched for a compiler switch I might be missing but with no luck so I thought I woud post. I am using the latest version. When I try to compile the following: #include <afxctl.h> void func() { int i = 0; } I get the following errors: Error: C:\DM\BIN\..\include\win32\objidl.h(358): forward referenced class 'IUnknown' cannot be a base class Error: C:\DM\BIN\..\include\win32\objidl.h(615): forward referenced class 'IUnknown' cannot be a base class Error: C:\DM\BIN\..\include\win32\objidl.h(821): forward referenced class 'IUnknown' cannot be a base class Error: C:\DM\BIN\..\include\win32\objidl.h(1183): forward referenced class 'IUnknown' cannot be a base class Thanks! Andy C.
Jan 16 2004
Solved: -Aa- and never using the -HO switch allows a compile in both Debug and Release! (IDE does not set -Aa- correctly so I stuck it in sc.ini). Andy C In article <bu9jua$1t72$1 digitaldaemon.com>, Andy C says...Walter, This is what I am using: c:\dm\bin\dmc cctest.cpp -cpp -c -Aa -HO -D_DEBUG=1 -D_MBCS=1 -D_X86_=1 -D_MT=1 -IC:\dm\mfc\INCLUDE -IC:\dm\INCLUDE CCTest.CPP is: // cctest.cpp #include <afxctl.h> void func() { int i = 0; } Thanks - Andy In article <bu93m4$12cv$3 digitaldaemon.com>, Walter says...I just tried it and it works. Perhaps your INCLUDE environment variable isn't set right? "Andy C" <Andy_member pathlink.com> wrote in message news:bu6b06$2dtm$1 digitaldaemon.com...I searched for a compiler switch I might be missing but with no luck so I thought I woud post. I am using the latest version. When I try to compile the following: #include <afxctl.h> void func() { int i = 0; } I get the following errors: Error: C:\DM\BIN\..\include\win32\objidl.h(358): forward referenced class 'IUnknown' cannot be a base class Error: C:\DM\BIN\..\include\win32\objidl.h(615): forward referenced class 'IUnknown' cannot be a base class Error: C:\DM\BIN\..\include\win32\objidl.h(821): forward referenced class 'IUnknown' cannot be a base class Error: C:\DM\BIN\..\include\win32\objidl.h(1183): forward referenced class 'IUnknown' cannot be a base class Thanks! Andy C.
Jan 16 2004