Ch02I7 2019-03-09 09:51 采纳率: 0%
浏览 2580

总是gcc: fatal error: input file ‘\xe6\x9c\xaa\xe5\x90\x8d’ is the same as output file报错怎么办呀

萌新请教!

刚装了Linux系统,从Dev 换到了geany
然后每个程序都报下面的错

gcc -Wall -o "未名" "未名" (在目录 /home/ch02i7/文档 中)
gcc: fatal error: input file ‘\xe6\x9c\xaa\xe5\x90\x8d’ is the same as output file
compilation terminated.
编译失败。

这样子。
就算我打书上的代码也报错。

#include <stdio.h>
enum COLOR{RED,YELLOW,GREEN,NUMCOLORS};

int main(int argc, char **argv)
{
    int color = -1;
    char* colornames[NUMCOLORS]={"red","yellow","green"};
    char* colorname = NULL;
    printf("请输入你喜欢颜色的代号\n");
    scanf("%d",&color);
    if(color>-1 && color<NUMCOLORS)
    colorname = colornames[color];
    else colorname = "unknown";
    printf("你最喜欢的颜色是%s\n",colorname);
    return 0;
}

求助
xuexue

  • 写回答

1条回答 默认 最新

  • threenewbee 2019-03-10 14:20
    关注

    中文不认识,你把那两行中文换成英文吧。程序文件名也不要放在文档这样的中文文件夹下

    评论

报告相同问题?

悬赏问题

  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大