Solved

CString and Link Errors

Posted on 1998-04-12
5
183 Views
Last Modified: 2010-04-10
I asked why I got all those error. This is not a question but the answer for the experts who tried to help.  I appreciate that.The real problem was that the code was sent to me by someone using an newer compiler and he used the header stdafx.h. That is not where CString is defined in VC 4.0. It is in afx.h..... I got a compile and run after that simple change....
0
Comment
Question by:Cyberdater
  • 2
  • 2
5 Comments
 

Author Comment

by:Cyberdater
Comment Utility
Edited text of question
0
 
LVL 22

Expert Comment

by:nietod
Comment Utility
Thanks for letting us know.
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 0 total points
Comment Utility
Your stdafx.h should INCLUDE afx.h anyway.

Try creating a new project with AppZiard and get the stdafx.h from that.

0
 

Author Comment

by:Cyberdater
Comment Utility
I generated both an Application and Console workspace before and after I inserted the .cpp.  Also if I include stdafx.h as well as afx.h I get into errors.  I read the stdafx.h and it does contain afx.h in the core headers.  Something really odd to me is that stdafx.h is located in mfcdevstd\mfc\src instead of mfcdevstd\mfc\include and the applications cannnot find it until I put the src into the include paths under options..directory.
0
 
LVL 10

Expert Comment

by:RONSLOW
Comment Utility
you should have your own stdafx.h (make a copy of the one in MFC source or use the one AppWizard writes for you).  Don't directly refer to the one in MFC source area.

do NOT put any code or preprocessor statments before #include "stdafx.h" as any lines there are ignored when precompiled headers are used.

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now