How to export project with GDNative for Windows 10?

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

Hello everybody!

I did example project according to official tutorial

GDNative C++ example — Godot Engine (3.1) documentation in English

I was doing step by step and I got some troubles with Sconstruct file which was provide in this tutorial (he did not compile). So I took Sconstruct from this video tutorial:

https://www.youtube.com/watch?v=2hK7vOigbLQ

And finally my project is completed. It works if I run him from Godot 3.1.2.
And it works if I run him on a local PC with Windows 10(64x) (launch .exe).

BUT… It does not work if I run it on other computers which too Windows 10(64x).
I get error 126. “Can’t open dynamic library: bin/win64/libgdexample.dll. Error: Error 126:”

WHY? What am I doing wrong?

The main thing: What do I need to do to export the project to other PCs?

And… Why SConstruct from official tutorial gives an error message?

Thank you!

:bust_in_silhouette: Reply From: Zylann

Error 126 means the library is missing a dependency. That dependency may have been present in some computers you tested it on, but other computers don’t have it. Maybe you’ll need to package that dependency with your game?

See c++ - DLL Load Library - Error Code 126 - Stack Overflow

:bust_in_silhouette: Reply From: Roket

Finally I did it. I don’t fully understand which steps helped me, but I did this:

  1. Build my dll in “release”

c++ - How can I use the compiled DLL in a client PC without installing Windows SDK? - Stack Overflow

  1. Replace flags MD and MDd on MT and MTd accordingly