Closed Kibouo closed 6 years ago
Ah yes, I should get around to fix that.
The problem is that some compilers like to see a.operator T()
, other's like to see static_cast<T>(a)
, I should figure out which compiler wants what or if there's a proper way to deal with this in C++.
So for now if you just want to get it working then try a.opeator T()
or maybe (T) a
too.
If some C++ guru knows how to best fix that problem - feel free to tell me or make a PR 😂
Problem: Was following every step of the README. However, when running
clang -fPIC -o src/init.os -c src/init.cpp -g -O3 -std=c++14 -Icpp_bindings/include -Igodot_headers -Icpp_bindings/include/
a few errors occur.Most are easy to resolve (unable to find included files due to incorrect path). But then there is following
In file included from src/init.cpp:1: cpp_bindings/include/core/Godot.hpp:64:42: error: ambiguous conversion for static_cast from 'godot::Variant' to 'godot::String' static T _arg_cast(Variant a) { return static_cast<T>(a); }
Same error occurs when using GCC.
Info: