Cyberdater
asked on
CString and Link Errors
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....
Thanks for letting us know.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
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.
do NOT put any code or preprocessor statments before #include "stdafx.h" as any lines there are ignored when precompiled headers are used.
ASKER