File not recognized: File truncated GCC error

前端 未结 3 1370
误落风尘
误落风尘 2020-12-30 18:21

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++  -         


        
3条回答
  •  没有蜡笔的小新
    2020-12-30 19:10

    Just as an info if someone comes around here.

    Another problem (with the same error) could be, that you are using ccache for faster compilation. In this case, the corrupt *.o file is there as well. So for that reason you have to clean the cache with

    ccache -C (note the upper case C!)

    Wasted me hours the first time ;-)

提交回复
热议问题