Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
“如何修复”;gcc isn';t被识别为内部命令“;用克莱恩做窗户?_C_Gcc_Clion - Fatal编程技术网

“如何修复”;gcc isn';t被识别为内部命令“;用克莱恩做窗户?

“如何修复”;gcc isn';t被识别为内部命令“;用克莱恩做窗户?,c,gcc,clion,C,Gcc,Clion,我按照程序安装了 因此,现在我编写了一个C程序,并尝试输入终端gcc test.C,但我得到gcc不是一个可识别的内部命令 这是我的节目: #include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> struct a_struct {int a; int b; int c;}; int main() { struct a_struct*

我按照程序安装了

因此,现在我编写了一个C程序,并尝试输入终端
gcc test.C
,但我得到
gcc不是一个可识别的内部命令

这是我的节目:

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>

struct a_struct {int a; int b; int c;};

int main()
{

    struct a_struct* pa = (struct a_struct*) 1000;
    printf ("pa=%ld\n", (long)pa);

    struct a_struct* pb = &pa[10];
    printf ("pb=%ld\n", (long)pb);

    struct a_struct* pc = pa + 10;
    printf ("pc=%ld\n", (long)pc);

    struct a_struct* pd = pc--;
    printf ("pc=%ld, pd=%ld\n", (long)pc, (long)pd);

    struct a_struct* pe = ++pb;
    printf ("pe=%ld, pb=%ld\n", (long)pe, (long)pb);

    return 0;
}
#包括
#包括
#包括
#包括
结构a_结构{inta;intb;intc;};
int main()
{
结构a_结构*pa=(结构a_结构*)1000;
printf(“pa=%ld\n”,(长)pa);
结构a_结构*pb=&pa[10];
printf(“pb=%ld\n”,(长)pb);
结构a_结构*pc=pa+10;
printf(“pc=%ld\n”,(长)pc);
结构a_结构*pd=pc--;
printf(“pc=%ld,pd=%ld\n”,(长)pc,(长)pd);
结构a_结构*pe=++pb;
printf(“pe=%ld,pb=%ld\n”,(长)pe,(长)pb);
返回0;
}
在Clion设置中,我有:


您应该将gcc.exe的路径(通常位于@C:\MinGW\bin)添加到PATH环境变量(用户或系统范围)

您可能需要将gcc.exe的路径(通常为C:\MinGW\bin)@nivpeled作为系统变量或用户变量添加到路径中?这两种方式都可以……谢谢,现在它可以工作了,您可以添加一个答案,这样我就可以对它进行更新投票了