Home > Enterprise >  How to compile and run C on a Surface Pro X?
How to compile and run C on a Surface Pro X?

Time:11-30

I'd like to program some Ansi-C on a Surface Pro X. On my Computer I just set up VS Code as an editor and installed Msys2 which comes with the GCC. But the same won't work on the Surface Pro X, cause if the processor architecture as I understand (correct me if I'm wrong). So my question is: How can I compile and run C on a Surface Pro X and also check for Ansi C conformity. It also would be nice to be able to work in VS Code. Also is this a general problem of the Surface Pro X? Would those issues also appear when trying to program java or python?

CodePudding user response:

I don't have a Surface Pro X or any other ARM Windows device, however it should be possible to use VS Code since there has been a Windows on ARM version since May 2020 (download on the usual Visual Studio Code download page). I am not sure on what development environments are available for Windows on ARM, but you could always install WSL (the Windows subsystem for Linux) where you can then install pretty much anything you want. You can then link your VS Code to your WSL and work there. To install development tools for any language you would then follow instructions on how to install that environment for Linux (eg. using apt-get for Debian and it's derivatives like Ubuntu).

To install basic development tools for Java and C/C in WSL type sudo apt install default-jdk default-jre gcc g , python is generally already installed in a linux environment.

  • Related