Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No "sqrtf" in math.h

I am working under Ubuntu 11.04 and now engaged in a project whose source code uses routines like "sqrtf" or "lgamma", which are complained by my IDE, claiming that they cannot be found in "math.h". A senior member told me I need POSIX.1-2001. I used ldd --version to check my glibc's version and it gave ldd (Ubuntu EGLIBC 2.13-0ubuntu13) 2.13. I guessed the embedded version of glibc is simplified so I decided to make it upgraded to the full glibc-2.14. But after some search in aptitude I found that I have to do a manual installation. Getting frustrated all the way, I realize maybe the God is warning me off the wrong path. So...can anyone give some hints for me? Thank you~

like image 362
ziyuang Avatar asked Jul 29 '11 19:07

ziyuang


2 Answers

Is the linker called with argument -lm?

like image 173
David Avatar answered Nov 15 '22 07:11

David


As the comment pointed out, it was a bug of CDT.

like image 27
ziyuang Avatar answered Nov 15 '22 09:11

ziyuang