compilation error: lround undeclared
yue-feng sun
sunyf@ldeo.columbia.edu
Fri Jul 12 12:26:00 GMT 2002
Hi All,
The gcc version is
$ rpm -a -q | grep -i gcc
gcc-g77-2.96-110
gcc-2.96-110
gcc-objc-2.96-110
gcc-c++-2.96-110
gcc-java-2.96-110
system: Intel P4 i686, RedHat Linux 7.3 Linux Kernel 2.4.18-3
Error:
/usr/lib/gcc-lib/i386-redhat-linux/2.96/cc1plus /tmp/ccoartm5.ii -quiet
-dumpbase cppmain.C -O3 -Wunused -version -funroll-all-loops
-fexpensive-optimizations -o /tmp/ccQpUKf6.s
GNU C++ version 2.96 20000731 (Red Hat Linux 7.3 2.96-110) (i386-redhat-linux)
compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.3 2.96-110).
cppmain.C: In function `void int_round ()':
cppmain.C:43: `lround' undeclared (first use this function)
cppmain.C:43: (Each undeclared identifier is reported only once for
each function it appears in.)
make[2]: *** [cppmain.o] Error 1
I had #include <math.h> in the C++ program cppmain.C and
used the math function lround(double).
math functions like atan are ok but not lround, floor, etc.
However, the code written in c instead of C++ is ok.
Is this a bug or I didn't have the correct include header for additional
C++ extra?
Thanks,
Sun
More information about the Gcc-bugs
mailing list