[英]what does this error mean in c?
#include<stdio.h>
#include<ctype.h>
int main()
{
char a,b;
FILE *fp;
fp=fopen("lext.txt","w");
fprintf(fp,"PLUS");
return 0;
}
我得到的錯誤就是這個
/tmp/ccQyyhxo.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
您正在使用gcc
編譯.cpp
文件。 將文件重命名為.c
以便將其編譯為C代碼或使用C ++驅動程序g++
。 這將鏈接到提供這些功能的stdc++
庫中。
ld
是鏈接器,它報告存在鏈接問題。 錯誤消息的gxx部分暗示它與C ++問題有關,這使得答案Johannes Schaub - litb給出了正確的根本原因。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.