簡體   English   中英

這個錯誤在c中意味着什么?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM