No "sqrtf" in math.h

I work under Ubuntu 11.04 and am now working on a project whose source code uses routines such as "sqrtf" or "lgamma" that complain about my IDE, claiming that they cannot be found in "math.h". The senior member told me that I need POSIX.1-2001 . I used ldd --version to check my version of glibc and gave ldd (Ubuntu EGLIBC 2.13-0ubuntu13) 2.13 . I guessed that the built-in version of glibc was simplified, so I decided to upgrade it to full glibc-2.14. But after some searching in aptitude, I found that I needed to do a manual installation. I get upset, realizing that God warns me of the wrong path. So ... can anyone give me some hints? Thanks ~

+6
source share
2 answers

As noted in the comment, it was a CDT error.

+1
source

Is the linker invoked with the -lm argument?

+1
source

Source: https://habr.com/ru/post/893893/


All Articles