I
I
Ilya1992018-08-06 16:31:46
Visual Studio Code
Ilya199, 2018-08-06 16:31:46

How to compile c-code in vscode?

having written the c-code in vscode, I click on "view" in the upper left corner, almost the corner
then the integrated terminal, go to the folder where the code file is, then gcc main.c and a.exe
gives this
5b684dbf8bfbd021804211.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tom Nolane, 2018-08-06
@Ilya199

As mentioned above, Windows PowerShell was designed with security and reliability in mind. The main security component of Windows PowerShell is its execution policy. By default, this policy is set to Restricted. You can verify this with the Get-ExecutionPolicy cmdlet. Scripts are not executed in Restricted mode. Dot. Because this is the default mode, Windows PowerShell cannot be used to run predefined scripts.
...
In addition, Windows PowerShell cannot execute scripts from the current directory. You must specify a path. This was done to prevent command substitution.
....
However, because Windows PowerShell doesn't support running scripts from the current folder, this error is ruled out. If you really want to run the script from the current folder, you just need to specify the path, such as .\myscript . An explicit reference to the current folder allows you to confirm that you want to run a script and not a shell command.

source

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question