473,395 Members | 2,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Cannot compile VC++ 6.0 with CRichEditView

I have an MDI that I need to change to an RTF MDI.

I have the include:
#include "afxrich.h"

Compiler always stops on the line:
CRichEditView crev;

Errors given:
MDIDEMO.cpp(75) : error C2146: syntax error : missing ';' before identifier
'crev'
MDIDEMO.cpp(75) : error C2501: 'CRichEditView' : missing storage-class or
type specifiers
MDIDEMO.cpp(75) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

MDIDEMO.obj - 3 error(s), 0 warning(s)

I can open the "afxrich.h" file and see the declaration "class
CRichEditView;", but that doesn't seem to help the compiler any.

Sorry for the elementary question, but I cannot think of any other way to
make the compiler recognize that class.
--
MarkC
Nov 17 '05 #1
2 1792
You didn't put the include above the include of the precompiled header file
(typically #include "stdafx.h")? If so you need to move it below that.

Ronald Laeremans
Visual C++ team

"markC2004" <ma*******@discussions.microsoft.com> wrote in message
news:F4**********************************@microsof t.com...
I have an MDI that I need to change to an RTF MDI.

I have the include:
#include "afxrich.h"

Compiler always stops on the line:
CRichEditView crev;

Errors given:
MDIDEMO.cpp(75) : error C2146: syntax error : missing ';' before
identifier
'crev'
MDIDEMO.cpp(75) : error C2501: 'CRichEditView' : missing storage-class or
type specifiers
MDIDEMO.cpp(75) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

MDIDEMO.obj - 3 error(s), 0 warning(s)

I can open the "afxrich.h" file and see the declaration "class
CRichEditView;", but that doesn't seem to help the compiler any.

Sorry for the elementary question, but I cannot think of any other way to
make the compiler recognize that class.
--
MarkC

Nov 17 '05 #2
I have tried moving the #include <afxrich.h> line above and below #include
"stdafx.h", and also inside stdafx.h, both above and below the #include
<windows.h>. By the Visual C++ IDE instructions, it told me to put all
"library" type includes in the stdafx.h file. I did, placing "#include
<afxrich.h>" below "#include <windows.h>", and get the error:
"fatal error C1189: #error : WINDOWS.H already included. MFC apps must not
#include <windows.h>"

This does not make sense to me because the only place that I can find
"#include windows" is in the stdafx.h file, and when I comment that line out,
then I get errors about other terms in the code not being defined (it.
_beginthreadex, _endthreadex).

Thanks again for your interest and help,

MarkC

"Ronald Laeremans [MSFT]" wrote:
You didn't put the include above the include of the precompiled header file
(typically #include "stdafx.h")? If so you need to move it below that.

Ronald Laeremans
Visual C++ team

"markC2004" <ma*******@discussions.microsoft.com> wrote in message
news:F4**********************************@microsof t.com...
I have an MDI that I need to change to an RTF MDI.

I have the include:
#include "afxrich.h"

Compiler always stops on the line:
CRichEditView crev;

Errors given:
MDIDEMO.cpp(75) : error C2146: syntax error : missing ';' before
identifier
'crev'
MDIDEMO.cpp(75) : error C2501: 'CRichEditView' : missing storage-class or
type specifiers
MDIDEMO.cpp(75) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

MDIDEMO.obj - 3 error(s), 0 warning(s)

I can open the "afxrich.h" file and see the declaration "class
CRichEditView;", but that doesn't seem to help the compiler any.

Sorry for the elementary question, but I cannot think of any other way to
make the compiler recognize that class.
--
MarkC


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Laax | last post by:
Hi, I am trying to compile a .cc file and get the following error. I have translated the error message from original japanese text. So, it may not look exactly like standard(English) error...
10
by: Jean-David Beyer | last post by:
I have some programs running on Red Hat Linux 7.3 working with IBM DB2 V6.1 (with all the FixPacks) on my old machine. I have just installed IBM DB2 V8.1 on this (new) machine running Red Hat...
13
by: Nick Z. | last post by:
Whenever I try to compile a VC++ program using VS .NET 2003 I get an error saying mspdb71.dll not found. How can I fix this error? PS. I ran vsvars32.bat and it did not change a thing. ...
5
by: Bruce D | last post by:
I'm wondering why I cannot compile a co-workers project from my PC? Here's the situation: We both have WinXP. We both have VS .NET 2003 installed. I can open her project and make changes to the...
3
by: nick | last post by:
Seems the FillRowMethodName caused the problem? C# works. but not C++? using namespace System; using namespace System::Data; using namespace System::Data::Sql; using namespace...
4
by: youpak2000 | last post by:
Hi, I'm working on a VC++ project developed using Visual Studio 2003 and 2005. I want to compile the solutions from command like without installing VS IDE. I downloaded a free Visual C++...
5
by: mohammaditraders | last post by:
Question # 1 Write a program which consists of a class named Student, the class should consists of three data members Name, Ob_marks, Total_marks and two member functions...
1
by: shreesaidas | last post by:
hi, can anyone tell me this, how to compile vc++ project through ant- build.xml? appritiate your help.. thanks..
5
by: sam.barker0 | last post by:
Hi all, I have this following error In test.h =========================================== #include <iostream> #include <cstddef> #include <utility>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.