Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
49 Views

Command-line error: old for-init compatibility mode cannot be used with C++11 mode

 

Having trouble with the error message

Command-line error: old for-init compatibility mode cannot be used with C++11 mode

We are moving an existing application compiled for win32 on an XP box with ver 11.1.067 to win10 with ver 2017.1.143

The icproj file copied across and converted on opening - apparently sucessfully

but NOTHING will compile - we just get the above error message.

Any assistance would be appreciated

=G=

 

 

 

 

 

 

0 Kudos
3 Replies
Highlighted
Beginner
49 Views

Also, the C++11 option was turned off

G

0 Kudos
Highlighted
49 Views

This diagnostic is given for the /Zc:forScope command line option.  Refer to the msdn page for details about the option: https://msdn.microsoft.com/en-us/library/84wcsx8x.aspx

The remedy is to remove the command line option.  Hope this helps.

--Melanie

0 Kudos
Highlighted
Black Belt
49 Views

I've seen this old Microsoft extension used in the context of break.  It becomes impossible to know whether a variable takes outer or inner scope.  If you have not in fact used a variable defined inside the for after leaving the for scope, a working example of your problem would be needed.

0 Kudos