This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
g++ 'cmath' bug ?
- From: Gert Vandelaer <djeezus at skynet dot be>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 12 May 2004 21:49:38 +0200
- Subject: g++ 'cmath' bug ?
- Organization: GodSells.Org
Hy all,
I have a major problem with my gcc-g++ compiler on my system (Linux, with Slackware gcc-3.3.2 package) here's what happens when trying to compile a simple c++ program.
root@lapdjeez:~# cat test.cpp
#include <cmath>
#include <cstdio>
int main (int argc, char **argv)
{
printf("Hello\n");
return 0;
}
root@lapdjeez:~# g++-gcc-3.2.2 test.cpp
In file included from test.cpp:1:
/usr/include/c++/3.2.2/cmath:358: `modf' not declared
/usr/include/c++/3.2.2/cmath: In function `float std::modf(float, float*)':
/usr/include/c++/3.2.2/cmath:362: `::modff' undeclared (first use here)
/usr/include/c++/3.2.2/cmath: In function `long double std::modf(long double,
long double*)':
/usr/include/c++/3.2.2/cmath:376: `::modfl' undeclared (first use here)
root@lapdjeez:~#
I also tried removing/installing newer/older versions of gcc-g++ ...
even trying to build a new g++ compiler from source (gcc-3.3.2 and gcc-3.4.0) gives me similar "modf not declared" errors during the build process (via 'make bootstrap' or './configure && make' ..)
The C compiler works fine, and building a new C compiler also works, it's only c++ where there's problems.
Any pointers much appreciated,
bye,
Gert