Any clues how to include third-party C++ library to Godot?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By yaniss
:warning: Old Version Published before Godot 3 was released.

enter image description hereI’d like to use a 3rd party library written in C++ and include it in my gdscript in order to control the logic of the game. I’ve heard about gdnative. How can I use those C++ library files and interface them with the gdscript code without having to modify those file (too many of them) ? What I need is use these library as an API from gdscript.

Something like in the figure.
PS: I read the tutorial here but it talks only about one file with godot headers. But couldn’t understand how I can talk with that 3rd party code.

there are two ways to do it. GDNative or C++ modules

GDNative only exposes a subset of what you can do with c++ modules

you kinda have to be more specific and what classes you wish to touch

Custom modules in C++ — Godot Engine (latest) documentation in English

hungrymonkey | 2017-12-29 16:51

:bust_in_silhouette: Reply From: Zylann

The tutorial in the news is obsolete now. Up to date documentation is pending to be written anytime soon, but in the meantime this example exists: https://github.com/GodotNativeTools/GDNative-demos/tree/master/c/SimpleDemo (that one is in pure C though).

There is also this C++ demo: https://github.com/GodotNativeTools/GDNative-demos/tree/master/cpp/kinematic_character