_GLIBCXX_USE_C99 not working?
Fri May 18 08:59:00 GMT 2007
Christian Franke wrote:
> Defining _GLIBCXX_USE_C99 does not work with current Cygwin C++ includes.
> #define _GLIBCXX_USE_C99 1 // need std::llabs()
> #include <cstdlib>
> long long f(long long x)
> return std::llabs(x);
> Compile fails with:
> error: `::strtold' has not been declared
> error: `__gnu_cxx::strtold' has not been declared
> The function strtold() does actually not exist in stdlib.h
> and the corresponding _GLIBCXX_HAVE_STRTOLD in
> is not set.
> But "using ::strtold" exists in the "#if _GLIBCXX_USE_C99" part of
> Workaround: delete the two "using ::strtold" lines from cstdlib.
Look into the cstdlib header. You will find that llabs(long long) and
abs(long long) are in the __gnu_cxx namespace there. It is because long
long is not C++ standard type.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 542 bytes
Desc: OpenPGP digital signature
More information about the Cygwin