Y
yezi
HI, ALL:
I can not figure out the problem with compiling.
the message is "
/tmp/ccAxyQSj.o(.text+0x275): In function `main':
: undefined reference to `sqrt'
collect2: ld returned 1 exit status
"
At first I thought is because the gcc "math.h" do not have the function
: then I type "gcc --version "
gcc (GCC) 3.3.2 20031022 (Red Hat Linux 3.3.2-1)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
Then I use "man sqrt " in my system, it works.
My question : why the compiler failure?
THanks
bin YE
I can not figure out the problem with compiling.
the message is "
/tmp/ccAxyQSj.o(.text+0x275): In function `main':
: undefined reference to `sqrt'
collect2: ld returned 1 exit status
"
At first I thought is because the gcc "math.h" do not have the function
: then I type "gcc --version "
gcc (GCC) 3.3.2 20031022 (Red Hat Linux 3.3.2-1)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
Then I use "man sqrt " in my system, it works.
My question : why the compiler failure?
THanks
bin YE