Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can ARM desktop programs be built using visual studio 2012?

I was working with visual studio 2012 beta and my desktop (win32) program compiled fine in ARM architecture.

After upgrading to visual studio 2012 RC, the compiler would not work and spews out the following error:

"Compiling Desktop applications for the ARM platform is not supported"

I found a forum post on this http://connect.microsoft.com/VisualStudio/feedback/details/745580/arm-configuration-doesnt-work

Is it correct that Microsoft is really cutting off win32 development on ARM? And that compiling in VS2012 beta was just a fluke?

like image 781
Viesturs Avatar asked Jun 22 '12 06:06

Viesturs


People also ask

Does Visual Studio work on ARM?

Visual Studio can run on ARM-powered devices via x86 emulation, though some features are not currently supported on ARM. As such, we don't recommend running Visual Studio on devices that use ARM-based processors, and instead recommend remotely targeted ARM devices.

Does Visual Studio run on ARM Windows?

Microsoft has released Visual Studio 2022 17.3 Preview 2 today, and it's the first version of Visual Studio to run natively on Arm devices running Windows 11.

Does Visual Studio code run on ARM?

VS Code is now available for both Linux ARMv7 and ARM64 architectures. This means you can now officially use VS Code on a Raspberry Pi, Chromebook, and other ARM-based devices!


2 Answers

You can edit the file:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\ARM\Microsoft.Cpp.ARM.Common.props 

In the <PropertyGroup> section add the line:

<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport> 

before </PropertyGroup>

And that's all, you can build ARM desktop apps with VS2012.

like image 195
mamaich Avatar answered Oct 06 '22 01:10

mamaich


I was able to get around that error and compile a little "hello world" cpp file for ARM by adding the "/D _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE" command-line argument to the ARM version of cl at C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_arm. I found that #define from sn0w's answer on this question in the crtdefs.h file, without having to modify that file. Now, I can't guarantee that anything more complex will actually work, or that Microsoft hasn't instituted some sort of whitelisting or digital signature verification for Windows RT desktop apps, so even though it may compile, it may not be allowed to run when Windows RT is finally available.

Note that before you can run the ARM version of cl.exe from the command line, you must set the environment variables using this batch file: "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_arm\vcvarsx86_arm.bat"

like image 33
Paul Avatar answered Oct 05 '22 23:10

Paul