Godot version: 3.1 beta (commit 9ed34d44238d130f5c7d999bb7265e7c0e906567)
OS/device including version: Gentoo Linux 4.14.65, KDE 5 Plasma, NVidia w/proprietary drivers
Issue description:
You recently exported the method handles_type of the ResourceFormatLoader with a parameter named typename.
This compiles cleanly in Godot because typename is only contained in a string, but when creating GDnative bindings, the wrapper function actually uses typename (a reserved C++ keyword) as the parameter name:
In file included from include/gen/ResourceFormatLoaderVideoStreamGDNative.hpp:11:0,
from src/gen/ResourceFormatLoaderVideoStreamGDNative.cpp:1:
include/gen/ResourceFormatLoader.hpp:31:41: error: expected nested-name-specifier before ')' token
bool handles_type(const String typename);
Steps to reproduce:
--gdnative-generate-json-api godot-cpp/godot_headers/api.jsonCC @Zylann @karroffel @BastiaanOlij
That is a problem in the generation of the C++ bindings, there are several names used in the Godot API that are invalid C++ identifiers, so it has to be remapped to a different name (like _typename)
Confirmed, have same error, temporairly fixed, by manually editing api.json after generating and changing typename -> type_name
Closing as duplicate of GodotNativeTools/godot-cpp#228.
Most helpful comment
Confirmed, have same error, temporairly fixed, by manually editing api.json after generating and changing typename -> type_name