C, math.h and globals
Hi,
I have an odd thing with the math library and C. Take this simple program
as example:
#include <math.h>
double y1;
int main(void)
{
return 0;
}
When I try to compile this (just 'gcc test.c'), the compiler returns me
this error:
test.c:4: `y1' redeclared as different kind of symbol
/usr/include/bits/mathcalls.h:242: previous declaration of `y1'
I know that you should try to declare as few globals as possible, but I
had to compile a program with this issue from a friend (who runs windoze).
Isn't this a bug in the C library? I mean, the standard libraries ought
not to be interfering with the variables you choose?
My versions:
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
libc6-dev version: 2.3.1-5
Thanks in advance,
Sebastiaan
--
NT is the OS of the future. The main engine is the 16-bit Subsystem
(also called MS-DOS Subsystem). Above that, there is the windoze 95/98
16-bit Subsystem. Anyone can see that 16+16=32, so windoze NT is a
*real* 32-bit system.
Reply to: