#include<stdio.h>
#include<ctype.h>
int main()
{
char a,b;
FILE *fp;
fp=fopen("lext.txt","w");
fprintf(fp,"PLUS");
return 0;
}
the error i get is this
/tmp/ccQyyhxo.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
You are compiling a .cpp
file with gcc
. Rename the file to end with .c
so it compiles as C code or compile it with the C++ driver g++
. That will link in the stdc++
library providing these functions.
ld
is the linker and it is reporting that there is a link problem. The gxx part of the error message hints that it has something to do with a C++ problem which makes the answer Johannes Schaub - litb gives about the root cause correct.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With