This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: signbit
- From: Ian Lance Taylor <ian at airs dot com>
- To: Koh-ichiro YOSHIURA <kyoshi at net dot nagasaki-u dot ac dot jp>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 24 Oct 2005 20:14:19 -0700
- Subject: Re: signbit
- References: <p05111002bf8343670e68@[133.45.137.21]>
Koh-ichiro YOSHIURA <kyoshi@net.nagasaki-u.ac.jp> writes:
> I am a biology researcher working in University.
> I am compiling one calculation program. I had a trouble for compiling on
> MacOSX (10.3.9) with gcc 3.3.
>
> Error massage is following.
> "BFunction.cc:615: error: `signbit' undeclared (first use this function)"
>
> How can I overcome this? I cannot compile because gcc 3.3 is not included
> signbit function?
This is a question about the C++ language. It is not a question about
gcc. So this is the wrong mailing list.
First, gcc is a compiler, not a library. The signbit function is
provided by your system library.
Second, before you can call signbit it must be declared. On GNU/Linux
systems, it is declared in math.h, so you must #include <cmath> before
calling signbit.
(I don't have access to a MacOS X system myself.)
Ian