这个错误在c中意味着什么?

Hic*_*ick 9 c linker

#include<stdio.h>
#include<ctype.h>

int main()
{
    char a,b;
    FILE *fp;
    fp=fopen("lext.txt","w");


    fprintf(fp,"PLUS");

return 0;
}
Run Code Online (Sandbox Code Playgroud)

我得到的错误就是这个

/tmp/ccQyyhxo.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)

Joh*_*itb 14

您正在使用编译.cpp文件gcc.将文件重命名为end,.c因此它将编译为C代码或使用C++驱动程序进行编译g++.这将链接到stdc++提供这些功能的库中.

  • @Neil它隐含地引用了那些异常支持函数.人格例程由Itanium C++ ABI定义.请参阅http://www.codesourcery.com/public/cxx-abi/abi-eh.html#base-personality (4认同)