Compiling in VS2005 imported application that uses MFC

Compiling in VS2005 imported application that uses MFC

Post by YmVwcGUwM » Wed, 02 May 2007 01:04:01


hi,
i have an application developed in "Ms eMbedded Visual C++ 4.0" (for PDA and
SmartPhones). I have imported this app in VS2005 without problems, but when i
try to compile it, it gives me tons of errors, always in MFC classes. I don't
know if it is a versioning problem or some bad options in the
compiler/library paths...
Thanks
 
 
 

Compiling in VS2005 imported application that uses MFC

Post by Joseph M. » Wed, 02 May 2007 02:46:57

A few sample error messages might help...
joe


Joseph M. Newcomer [MVP]
email: XXXX@XXXXX.COM
Web: http://www.yqcomputer.com/
MVP Tips: http://www.yqcomputer.com/

 
 
 

Compiling in VS2005 imported application that uses MFC

Post by YmVwcGUwM » Thu, 03 May 2007 21:54:00


Of course, here's the log (begin and end):

1>------ Build started: Project: ViewerAccelerato, Configuration: Debug
Pocket PC 2003 (ARMV4) ------
1>Compiling...
1>GPSControl.cpp
1>_CE_ACTIVEX was not defined because this Windows CE SDK does not have DCOM.
1> _CE_ACTIVEX could be caused to be defined by defining
_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA, but it is recommended that this be
done only for single-threaded apps.
1>_ATL_NO_HOSTING was defined because _CE_ACTIVEX was not defined.
1>C:\Programmi\Microsoft Visual Studio
8\VC\ce\atlmfc\include\afxstat_.h(164) : error C2143: syntax error : missing
';' before '*'
1>C:\Programmi\Microsoft Visual Studio
8\VC\ce\atlmfc\include\afxstat_.h(164) : error C4430: missing type specifier
- int assumed. Note: C++ does not support default-int
1>C:\Programmi\Microsoft Visual Studio
8\VC\ce\atlmfc\include\afxstat_.h(164) : error C4430: missing type specifier
- int assumed. Note: C++ does not support default-int
1>C:\Programmi\Microsoft Visual Studio
8\VC\ce\atlmfc\include\afxstat_.h(205) : error C2504:
'CMap<KEY,ARG_KEY,VALUE,ARG_VALUE>' : base class undefined
1> with
1> [
1> KEY=void *,
1> ARG_KEY=void *,
1> VALUE=void *,
1> ARG_VALUE=void *
1> ]
1>..\src\MobiX3D-Intel2700G\trunk\GPSControl.cpp(58) : error C3861:
'AfxBeginThread': identifier not found
1>..\src\MobiX3D-Intel2700G\trunk\GPSControl.cpp(160) : error C3861:
'AfxBeginThread': identifier not found
1>..\src\MobiX3D-Intel2700G\trunk\GPSControl.cpp(241) : error C2440:
'initializing' : cannot convert from 'BYTE' to
'ATL::CStringT<BaseType,StringTraits>'
1> with
1> [
1> BaseType=wchar_t,
1> StringTraits=StrTraitMFC<wchar_t>
1> ]
1> No constructor could take the source type, or constructor overload
resolution was ambiguous

...

1>Build log was saved at "file://c:\Documents and
Settings\Beppe\Desktop\Tesi\Codice\MobiX3D-Intel2700G\vieweraccelerato\Pocket
PC 2003 (ARMV4)\Debug\BuildLog.htm"
1>ViewerAccelerato - 55 error(s), 227 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

I have already imported another application from eMbedded 4.0 to VS2005 that
works fine, i think because i haven't used MFC...

I still don't know why those errors occours: when i try to use "Go to
definition" i always find a definition in MFC files, so i think there is a
part of the library that's not builded, but i don't know how to solve this
problem.
Thanks
 
 
 

Compiling in VS2005 imported application that uses MFC

Post by Joseph M. » Fri, 04 May 2007 00:32:55

ee below...
On Wed, 2 May 2007 05:54:00 -0700, beppe03 < XXXX@XXXXX.COM > wrote:

****
This is suggestive of why AfxBeginThread is not defined. It looks like there are some
requirements for defining symbols in the new embedded system. Unfortunately, other than
this suggestion, I'm at a loss because I don't use embedded.
****
****
What is on line 164? This looks like a cascaded error caused by the undefined symbol
problem.
****
****
What is on line 205? This is again probably caused by the earlier issues, and is a
cascaded error.
****
****
This may be some limitation of embedded MFC; it should be defined, but there may be a
subsetting issue involved, or perhaps some conditional compilation option is now required
that was previously assumed.
****
****
What is the source line? This looks like a genuine error caused by more extensive error
checking. Probably a CString constructor that has the wrong argument type.
****
Joseph M. Newcomer [MVP]
email: XXXX@XXXXX.COM
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
 
 
 

Compiling in VS2005 imported application that uses MFC

Post by YmVwcGUwM » Sat, 19 May 2007 00:43:01

Thank you for your help, i solved a lot of problems, but i'm still fighting
with some errors...

...

#include <afx.h>
class CMainFrame : public CFrameWnd
{

...

#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
...

this code gives me the following error:

1>c:\documents and settings\beppe\desktop\tesi\codice\lamp3d\MainFrm.h(42) :
error C2061: syntax error : identifier 'CDumpContext'

Thanks & Bye!