Godot version
4.5.beta
godot-cpp version
latest
System information
Windows 11 - MSVC
Issue description
There's a compiler issue after adding CANVAS_LAYER_MIN to godot-cpp, After compiling the library and headers there will be :
static const int CANVAS_LAYER_MIN = -2147483648;
static const int CANVAS_LAYER_MAX = 2147483647;
Which causes error in compile :
godot_cpp\classes\rendering_server.hpp(805,38): error C4146: unary minus operator applied to unsigned type, result still unsigned.
Here's the lines from extension_api.json
{
"name": "CANVAS_LAYER_MIN",
"value": -2147483648 <- TYPO
},
{
"name": "CANVAS_LAYER_MAX",
"value": 2147483647
}
Steps to reproduce
- Clone godot-cpp repo
- Build
- Link against GDExtension with usage of Rendering Server
How to fix :
Change -2147483648 to -2147483647 or use (-2147483647 - 1)