Linux在编译我的工作时随机删除了我的文件?

问题描述 投票:2回答:1
gcc -L/root/Desktop - Wall -o prog3.c -pthread -lcopy
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.0: In function '_start': (.text+0x20): undefined reference to 'main' 
collect2: error: ld returned 1 exit status

这是我的错误代码。 prog3.c无处可寻,究竟发生了什么事有什么办法让我的文件回来?粗体是我运行的命令,其余的是生成的控制台输出

linux compilation gnu recover
1个回答
0
投票

你的问题在这里:-o prog3.cgcc-o option用于告诉gcc它应该为它生成的可执行文件赋予哪个名称。所以在这里,你基本上要求你的编译器用可执行文件替换你的prog3.c源文件。可悲的是你的代码消失了......

© www.soinside.com 2019 - 2024. All rights reserved.