1

I have a c++ program built using VS2017 on windows7. When I run it on Windows7 or windows10 there is no problem.

If I Build the same program on Windows10 (still using VS2017) the program runs OK on Windows10 but when I try to run it on Windows7 I get an "0xC000001D: Illegal Instruction." error.

Is it even possible to run programs built in Windows10 on Windows7 ? and if so what can I do?

Thanks

gerstla
  • 587
  • 1
  • 5
  • 20

1 Answers1

0

The default SDKs will be different on your two VS2017 installations. Right-click the project, select "properties", then the "General" page. See Windows SDK Version.

You can install different SDK versions (and different Platform Toolsets) using the Visual Studio installer ("Modify").

You would probably need to install the v140 toolset.

Also see the response here: https://social.msdn.microsoft.com/Forums/vstudio/en-US/e19634d8-f635-4ed0-b8d7-45b64ccbd6fa/windows-sdk-7-in-visual-studio-2017?forum=visualstudiogeneral

...which states:

You can create a project with the default project template. After that, right click the project name under Solution Explorer and go to Configuration Properties-General, modify the 'Platform Toolset' to Windows7.1SDK, since you already installed the Windows SDK 7. Please have a look at the following note:

##To change the target platform toolset, you must have the associated version of Visual Studio or the Windows Platform SDK installed. For example, to target the Itanium platform with the Windows7.1SDK platform toolset, you must have Microsoft Windows SDK for Windows 7 and .NET Framework 4 SP1 installed

If the above not works, you can also modify the platform toolset to Visual Studio 2010 (v100), which has the same compiler like Windows SDK 7, if you have the VS 2010 and VS 2017 on the same computer

Den-Jason
  • 2,395
  • 1
  • 22
  • 17