Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,

Just upgraded from VS 2005 to VS 2010 (Brave or stupid?). It is an unmanaged MFC project. I am working under Windows 7 / 64.

After a few small corrections in my code I am facing the following:

1) The project compiles and runs OK (it seems so)
2) To get it to compile / link I was forced to point the VC Dircetories to the Visual Studio 8 Folders under program files

Microsoft Visual Studio 8\VC\atlmfc\lib and the same for Include

Any attempt to point to the 10.0 version produced a whole bunch of errors and unresolved externals, so I gave up but I don't like being linked backwards.

3) The more annoying problem is with the Resource editor. I open a dialog and right click to "Add Variable" to a button, but nothing happens.
It does bring up the expected dialog if I try doing that through the Class list (right click in the class and Add Variable works)

Any suggestions?

Cheers
Alex
Posted

You can not mix VS2010 with VS2008 include or link libraries. This is a grand mistake that will result in failure and mysterious behavior even if you think that something is working.

I would not waste my time with any problems related to this.

The VS2010 compiler needs to be used with the VS2010 include files, link libraries and runtime.

Period.
 
Share this answer
 
Yes I agree with you, but when I set it up to point to 10.0 it results in the following errors:

VB
>nafxcw.lib(afxglobals.obj) : error LNK2005: "public: virtual __thiscall CMemDC::~CMemDC(void)" (??1CMemDC@@UAE@XZ) already defined in MKVC8_VS2010.lib(GridCtrl.obj)

1>MKVC8_VS2010.lib(MKIni7Tab2.obj) : error LNK2001: unresolved external symbol "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA)

1>MKVC8_VS2010.lib(MKScreen7.obj) : error LNK2019: unresolved external symbol "public: int __thiscall CListCtrl::GetSubItemRect(int,int,int,class CRect &)" (?GetSubItemRect@CListCtrl@@QAEHHHHAAVCRect@@@Z) referenced in function "protected: void __thiscall LocalInputDlg::ProcessInputRequest(class CListCtrl *,class CPoint)" (?ProcessInputRequest@LocalInputDlg@@IAEXPAVCListCtrl@@VCPoint@@@Z)

1>MKVC8_VS2010.lib(MKCtrls7.obj) : error LNK2019: unresolved external symbol "public: static void __stdcall CFile::Remove(char const *)" (?Remove@CFile@@SGXPBD@Z) referenced in function "void __cdecl MKUpdateTime7(class CWnd *)" (?MKUpdateTime7@@YAXPAVCWnd@@@Z)

1>MKVC8_VS2010.lib(MKSmtp7.obj) : error LNK2019: unresolved external symbol "public: static int __stdcall CFile::GetStatus(char const *,struct CFileStatus &)" (?GetStatus@CFile@@SGHPBDAAUCFileStatus@@@Z) referenced in function "public: int __thiscall CSMTPBodyPart::SetFilename(class ATL::CStringT<char,class StrTraitMFC<char,class ATL::ChTraitsCRT<char> > > const &)" (?SetFilename@CSMTPBodyPart@@QAEHABV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z)

1>MKVC8_VS2010.lib(FileDialogEx.obj) : error LNK2001: unresolved external symbol "public: __thiscall CFileDialog::CFileDialog(int,char const *,char const *,unsigned long,char const *,class CWnd *,unsigned long)" (??0CFileDialog@@QAE@HPBD0K0PAVCWnd@@K@Z)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900