delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/17/05:17:52

Date: Mon, 17 Apr 2000 10:54:50 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Dennis Yelle <dennis51 AT jps DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: Where is atoll()?
In-Reply-To: <38FA6A8B.E56DDD3C@jps.net>
Message-ID: <Pine.SUN.3.91.1000417105427.14867R-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019