Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::sqrt no member named sqrtf #10

Open
ElandaOfficial opened this issue May 26, 2020 · 3 comments
Open

std::sqrt no member named sqrtf #10

ElandaOfficial opened this issue May 26, 2020 · 3 comments

Comments

@ElandaOfficial
Copy link
Contributor

ElandaOfficial commented May 26, 2020

The function std::sqrtf is not available by default in GCC, it requires you to add the -lm flag to the compiler which may damage portability.

Can be found in file ff_meters_LevelMeterSource.h:105 (LevelMeterSource::ChannelData::getAvgRMS())

Edit: Removing std seems to fix the problem

@ElandaOfficial
Copy link
Contributor Author

ElandaOfficial commented Jun 22, 2020

Reopening this issue as I still cannot build this on GCC as sqrtf is still not in the standard.

@ffAudio
Copy link
Owner

ffAudio commented Jun 22, 2020

The module header adds the -lm to a linux build, see
https://github.com/ffAudio/ff_meters/blob/master/ff_meters.h#L39

Doesn't this solve the issue?
I am not sure, if falling back to the C sqrt is the right solution...

@ElandaOfficial
Copy link
Contributor Author

ElandaOfficial commented Jun 22, 2020

According to different sources this is a bug in GCC rather than a missing linker target.
They have not yet implemented this in the std namespace and thus only the C version seems to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants