简体   繁体   English

安装 gcc 后,如何使用 VS Code 运行 C 代码?

[英]how do I run a C code using VS Code after installing gcc?

After installing gcc on my Windows PC, I tried running a simple C program but, I keep getting an error message saying, "Unable to find executable for 'C\Users\Asi Polcarp\Desktop\Cprograms<executable.exe>'" This message is from VS Code. After installing gcc on my Windows PC, I tried running a simple C program but, I keep getting an error message saying, "Unable to find executable for 'C\Users\Asi Polcarp\Desktop\Cprograms<executable.exe>'" This消息来自 VS Code。

# include <stdio.h>
void main()
{
    printf("welcome");
}

first of all you need to put path of the GCC file to the folder environmental variables and try to compile it in the folder where you have actually put the path address.首先,您需要将 GCC 文件的路径放入文件夹环境变量中,并尝试将其编译到您实际放置路径地址的文件夹中。

In order to run C/C++ codes or most of other programming languages on VS Code I suggest the 'Code Runner' extension.为了在 VS Code 上运行 C/C++ 代码或大多数其他编程语言,我建议使用“Code Runner”扩展。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM