Mail Archives: djgpp/2000/04/17/05:17:52
On Sun, 16 Apr 2000, Dennis Yelle wrote:
> I see that C:\DJGPP\INCLUDE\STDLIB.H
> contains the line
> long long atoll(const char *_s);
[snip]
> gxx -O2 -Wall lltest.cpp -o lltest.exe
> I get this:
>
> c:/djgpp/tmp\ccWMYo4F.o(.text+0x27):lltest.cpp: undefined reference to `atoll'
> collect2: ld returned 1 exit status
>
> So, is atoll() missing from your library?
There's no `atoll' in the library. stdlib.h is in error, but you
shouldn't use the headers as the evidence of presence or absence of
library functions, anyway. That's what the library docs is for.
I suggest to use `strtoll' or `strtoull' instead. (In fact, I suggest
to use the `strto*' family instead of the `ato*' family for any type
of conversion.)
- Raw text -