On Tue, Aug 12, 2008 at 8:14 PM, Anil Gulecha <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> make fails when i try to build libcppunit with the following:
>
> TestAssert.cpp: In function 'void CppUnit::assertDoubleEquals(double,
> double, double, CppUnit::SourceLine, const std::string&)':
> TestAssert.cpp:25: error: 'isfinite' was not declared in this scope
> make[2]: *** [TestAssert.lo] Error 1
> make[2]: Leaving directory
`/root/libcppunit-dev/cppunit-1.12.0/src/cppunit'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/root/libcppunit-dev/cppunit-1.12.0/src'
> make: *** [all-recursive] Error 1


I presume you are using g++ since it is failing within c++ code.
The gcc support page on this is unclear: See
http://gcc.gnu.org/c99status.html (status for gcc 4.3)

for gcc iso/math_c99.h has isfinite(), this comes in with the -std=c99
switch.

>From the file /usr/include/c++/4.0.3/cmath (I checked in gcc 4.0.3)

std::isfinite() comes from __gnu_cxx::isfinite(), this in turn is available
if _GLIBCXX_USE_C99_MATH is defined.
Below worked for a one line program using isfinite()
g++ -D_GLIBCXX_USE_C99_MATH a.c

But I am not sure if this switch is an exposed interface. You may want to
check this.

-Shiv
_______________________________________________
gnusol-devel mailing list
[email protected]
http://lists.sonic.net/mailman/listinfo/gnusol-devel

Reply via email to