2012-10-05 12:22:30 |
Ludwig Knoblauch |
description |
I newly installed LinuxMint13 (Mate 64 Bit) , fully updated (2012-09-25) , on a new AMD64 machine.
gcc works properly except when using mathlib functions. Error messages always indicate that sqrt() and other mathlib functions are unresolved. I checked the installation and found:
- /usr/lib/x86_64-linux-gnu/libm.a
- /usr/lib/x86_64-linux-gnu/libm.so ( -> /lib/x86_64-linux-gnu/libm.so.6)
- /lib/x86_64-linux-gnu/libm.so.6 ( -> libm-2.15.so)
- /lib/x86_64-linux-gnu/libm-2.15.so
Symbol "sqrt" was present (type "W") in both the static and the shared library.
Both "gcc -lm" and "gcc -L/usr/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu -lm" reported persistently:
"undefined reference to sqrt".
Same picture with all other libm functions I tried. The source code contains "#include <math.h>", of course.
What is going wrong? |
I newly installed LinuxMint13 (Mate 64 Bit) , fully updated (2012-09-25) , on a new AMD64 machine.
gcc works properly except when using mathlib functions. Error messages always indicate that sqrt() and other mathlib functions are unresolved. I checked the installation and found:
- /usr/lib/x86_64-linux-gnu/libm.a
- /usr/lib/x86_64-linux-gnu/libm.so ( -> /lib/x86_64-linux-gnu/libm.so.6)
- /lib/x86_64-linux-gnu/libm.so.6 ( -> libm-2.15.so)
- /lib/x86_64-linux-gnu/libm-2.15.so
Symbol "sqrt" was present (type "W") in both the static and the shared library.
Both "gcc -lm" and "gcc -L/usr/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu -lm" reported persistently:
"undefined reference to sqrt".
Same picture with all other libm functions I tried. The source code contains "#include <math.h>", of course.
What is going wrong? |
|