Click here to Skip to main content
13,193,442 members (40,971 online)
Rate this:
Please Sign up or sign in to vote.
Hi all,
As microsoft provide new version of studio.i deciced to moved my window based application from visual studio 2003 to visual studio 2010.

a great Techanology aspected more use full control from 2010 compare to 2003.

but one problem arise when convert my window based program from 2003 to 2010,
2010 version of studio gives following errors that not given in 2003.
for(int i = 0;i<10;i++)

Undeclared identifier "i"

now same problem solved when im try like,
int i;
for(i = 0;i;<10;i++)

if i go with above techanique that tends to replace my all for loops.
that may take my 7 or 8 days.
So there are two aternative.

After spending my whole day on google doen't found any think useful.
So need expert.

Please ,
Provide me even single hint that convert my whole visual studio 2003 project to 2010 without an single error.

santosh dhanawade.
Posted 3-Sep-12 17:54pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You may change your project settings. See /Zc:forScope (Force Conformance in for Loop Scope)[^].

The option can be also changed in the source files using the conform pragma[^].
Coder Block 4-Sep-12 4:17am
thank u so much,
but when i compilee the application it throws errors as follows
pscrollbarinfo class error....
ccm_setwindowtheme not found ...
but when i define winver and winnt to 0x0500 then
all above errors are solved with new link error ie
error LNK1104:cannot open file mfc71d.lib......
please reply soon....
Jochen Arndt 4-Sep-12 4:44am
CCM_SETWINDOWTHEME requires Windows XP or later and is only defined when _WIN32_WINNT >= 0x0501 (see commctrl.h). But this has not changed compared to VS 2003.

mfc71d.lib is the static debug library of VS 2003. If you get this error, the library is referenced by your linker project settings (direct or via added object or library files).

You may open the .vcproj file of your project with a text editor to check if mfc71d.lib is part of the project. By default the MFC library names are not part of the project settings.

If your project uses other object files or libraries, these must be also rebuild using VS 2010.
Coder Block 5-Sep-12 1:34am
Now a new problem arised ,
Complilar not accepting AfxMessageBox("HELLO");

gives error cannot convert CString to LPCTSTR..
Jochen Arndt 5-Sep-12 2:58am
I did not see a CString object. However, constant strings should be passed using the _T() macro to be prepared for Unicode and ANSI builds: AfxMessageBox(_T("Hello")).
But this was also recommended with VS 2003.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171018.2 | Last Updated 4 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100