On Sat, Sep 13, 2003 at 10:52:29AM -0700, Claudiu Bichir wrote:
> Hy guys ! I'm triyng to compile this simple prog. in FreeBSD 5.0:
> #include <stdio.h>
> #include <netdb.h>
>
> int main()
> {
> char h[80];
> struct hostent *x;
>
> printf("Host:");scanf("%s",h);
> x=gethostbyname(h);
> printf("%s\n", x->h_addr_list[0][0]);
> return 0;
> }
>
> but it gives me the fallowing error
> /var/tmp//ccDxQUWw.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
> Does anybody know why ?What command are you using to compile this? That error typically means you're trying to link C++ code using the C compiler, which will not work (you need to link it with the C++ compiler), but your example doesn't support this. Kris
pgp00000.pgp
Description: PGP signature
