无法识别文件:文件已截断GCC错误 [英] File not recognized: File truncated GCC error

查看:3558
本文介绍了无法识别文件:文件已截断GCC错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Linux中使用Eclipse编译一个简单的Hello World程序,但我总是得到这个:

 构建目标:hello 
调用:GCC C ++链接器
g ++ -ohello./src/hello.o
./src/hello.o:文件无法识别:文件截断
collect2:ld返回1退出状态
make:*** [hello]错误1

****构建完成****

有没有人知道问题是什么?

解决方案

只要删除对象文件即可。



此错误最有可能在上一个生成被中断后,

I'm trying to compile a simple "Hello World" program in Linux using Eclipse, but I always get this:

Building target: hello
Invoking: GCC C++ Linker
g++  -o "hello"  ./src/hello.o   
./src/hello.o: file not recognized: File truncated
collect2: ld returned 1 exit status
make: *** [hello] Error 1

**** Build Finished ****

Does anyone have an idea what the problem is?

解决方案

Just remove the object file.

This error most likely appeared after the previous build was interrupted and object file was not generated completely.

这篇关于无法识别文件:文件已截断GCC错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆