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

Compilation error: call to 'abs' is ambiguous #1382

Open
jpchen opened this issue Feb 5, 2024 · 1 comment
Open

Compilation error: call to 'abs' is ambiguous #1382

jpchen opened this issue Feb 5, 2024 · 1 comment

Comments

@jpchen
Copy link

jpchen commented Feb 5, 2024

Godot version

4.2

godot-cpp version

4.2

System information

Mac os 10.15

Issue description

i am trying to build the godot-cpp library:
scons platform=macos arch=x86_64 generate_bindings=yes
and I get many such errors:

include/godot_cpp/core/math.hpp:569:9: error: call to 'abs' is ambiguous
        return std::abs(x);
               ^~~~~~~~

I am using clang 11.0.3 and I see scons is indeed passing the std=c++17 flag which should be compilable via my clang version.

Steps to reproduce

scons platform=macos arch=x86_64 generate_bindings=yes from the project directory.

Minimal reproduction project

Using either the master of 4.2 branch of the project on a macos 10.15.7 (intel chip).

@jpchen
Copy link
Author

jpchen commented Feb 8, 2024

Fixed this by implementing function overloading for abs for all the different types. I can open a PR if it's something the team wants to fix, otherwise it will fail on c++17 per the instructions in the readme.

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

1 participant