[prog] undefined reference to itoa
Aslı
gosalyn at gmail.com
Sat Dec 17 23:36:12 EST 2005
hi everyone,
i have quite an incomprehensible problem. I am writing some kind of an
authentication application between servers and clients using socket APIs.
This is the part of my code that drove me crazy:
char error_message[MAX_ERROR] ="Name not registered";
itoa(strlen(error_message),error_len,10);
i compiled the file with gcc (gcc file_s.c -o file_s) and got the message:
In function `main':
: undefined reference to `itoa'
collect2: ld returned 1 exit status
which seems to be a linker error. I was quite sure that "itoa" is in stdlib,
and i include stdlib in my code.
I'd be glad if you have any ideas..
Thanks in advance,
aslı
More information about the Programming
mailing list