【发布时间】:2018-05-05 13:25:57
【问题描述】:
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 无处可寻,到底发生了什么,有什么办法可以找回我的文件吗?粗体是我运行的命令,其余的是结果控制台输出
【问题讨论】:
-
-o prog3.c表示编译的输出要放入prog3.c。但是当编译失败时,它会删除输出文件。 -
为什么将源文件指定为输出文件?
-
这就是备份的用途。
标签: linux compilation gnu recover