Cannot open shared object file: No such file or directory when opening a GDNative plugin

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Matthew Berends

I am trying to create a GDNative plugin to act as a wrapper around a C++ library that I have also created. The C++ library that I am trying to use is a dynamic library and I added the path to the .so file in the SConstruct file and everything seems to build correctly.

However, when I open the Godot project and the dynamic library of the GDNative plugin attempts to open I get the following error:

Can't open dynamic library: /home/pathtoproject/terrainRenderer/demo/bin/x11/libgdrenderer.so. Error: libnodegraph.so: cannot open shared object file: No such file or directory modules/gdnative/gdnative.cpp:488 - No valid library handle, can't get symbol from GDNative object modules/gdnative/nativescript/nativescript.cpp:1504 - No nativescript_init in "res://bin/x11/libgdrenderer.so" found modules/gdnative/nativescript/nativescript.cpp:91 - Condition ' !script_data ' is true. modules/gdnative/gdnative.cpp:488 - No valid library handle, can't get symbol from GDNative object modules/gdnative/gdnative.cpp:393 - No valid library handle, can't terminate GDNative object Can't open dynamic library: /home/pathtoproject/terrainRenderer/demo/bin/x11/libgdrenderer.so. Error: libnodegraph.so: cannot open shared object file: No such file or directory

Does anyone have a solution to this problem?