How to compile in Visual Studio Code

Asked

Viewed 1,280 times

1

I installed the Mingw and in the instutions there is the indication of: Make sure your Compiler Executable is in your Platform form path so the Extension can find it. How do?

Thank you, this is all new to me.

1 answer

1

The warning is asking you to put the compiler path you are using in your operating system’s PATH.

If using Windows, this location would be the "environment variables":

Under Search, search and select: System (Control Panel)

  1. Click the Advanced System Settings link.
  2. Click on Environment variables. In the System Variables section, locate the PATH environment variable and select it. Click Edit.
  3. Click New. In the New System Variable window, add a new one with the path to the compiler binary. If, for example, you installed the mingw-W64 in C:/mingw-W64/, the path will be C:/mingw-w64/bin

The path will depend on the compiler you have chosen. On Windows, the Visual Studio Code documentation recommends mingw-W64 to work with C/C++ and on the link has more detailed instructions (in English) on this process with this compiler.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.