I've been following the C++ example in the Godot 3.1 documentation and everything has been working fine until I try and use the gdexample.gdns file and attach it to the sprite. When I load up the project I get these errors:
Can't open dynamic library: C:/Users/Ross/Documents/Programming/Game Dev/Godot/Testing and Examples/Scripts/godotDocsCPPTutorial/win64/libgdexample.dll. Error: Error 126: The specified module could not be found.
modules/gdnative/gdnative.cpp:488 - No valid library handle, can't get symbol from GDNative object
modules/gdnative/nativescript/nativescript.cpp:1505 - No nativescript_init in "res://Scripts/godotDocsCPPTutorial/win64/libgdexample.dll" found
Here is the content of the gdns file:
[gd_resource type="NativeScript" load_steps=2 format=2]
[ext_resource path="res://Scripts/godotDocsCPPTutorial/win64/gdexample.gdnlib" type="GDNativeLibrary" id=1]
resource_name = "gdexample"
class_name = "GDExample"
library = ExtResource( 1 )
_sections_unfolder = [" Resource "]
And here is the contents of the gdnlib file it points to:
Both the gdns and gdnlib files are in the same folder as the dll itself as it says to do in the docs. Also if I try to attach gdexample.gdns to the sprite the engine ctd's without any error and I have to reload the project. Don't know if thats a separate bug.
Any idea what is causing this. I am using a slightly different file structure than is described in the documentation as I like to have all my examples and testing in one project with a scene/level for each example/test but I haven't had any problems doing it this way yet.