How do I create my own physical server using GDExtension?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By AncRad
  1. What I want to get: I want to get my own physical server that will completely replace GodotPhysics3D.
  2. What I’m doing: I created my Extension library based on the godot-cpp/demo source code. In my library, I declared the MyServer class inherited from PhysicsServer3DExtension. In my class, I redefine some virtual functions of the PhysicsServer3DExtension class.
  3. What I get: the library works, my MyServer class replaces GodotPhysics3D, the engine and nodes use my class. I get errors in the console saying that I have to override the virtual functions _sync, _flush_queries, _end_sync, _step. The engine complains about other not overridden virtual functions, for example, _body_add_shape, but I can successfully cope with them. Error: “servers/extensions/physics_server_3d_extension.h:536 - Required virtual method MyServer::_sync must be overridden before calling. servers/extensions/physics_server_3d_extension.h:538 - Required virtual method MyServer::_flush_queries must be overridden before”
  4. What I can’t handle: I can’t override these virtual functions (_sync, _flush_queries, _end_sync, _step) so that the engine does not give errors, and my physical server functions successfully. Here’s what I get in Visual Studio Code when I try to override one of these virtual functions: “member function declared with ‘override’ does not override a base class memberC/C++(1455)”

I followed the file and the lines indicated in the errors. These are Godot source code files, where the virtual functions I need are really declared as macros.

	EXBIND0(init)
	EXBIND1(step, real_t)
	EXBIND0(sync)
	EXBIND0(end_sync)
	EXBIND0(flush_queries)
	EXBIND0(finish)

But for some reason, these virtual functions are not declared in the source code of godot-cpp. I can’t attach a link to the repository because these files are generated by the build system. But believe me, the functions I need are not in the file “godot-cpp/gen/include/godot_cpp/classes/physics_server3d_extension.hpp”.
I have a feeling that they were simply forgotten about. I tried to register them manually, but it ends up crashing the application and the editor.

Tell me what I’m wrong about. Why can’t I override only these virtual functions?