g++ 'cmath' bug ?
Gert Vandelaer
djeezus@skynet.be
Wed May 12 19:49:00 GMT 2004
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
More information about the Gcc-help
mailing list