+1 vote

Hello everybody!

I did example project according to official tutorial

https://docs.godotengine.org/en/3.1/tutorials/plugins/gdnative/gdnative-cpp-example.html

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!

in Engine by (52 points)

2 Answers

+1 vote
Best answer

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

1) Build my dll in "release"

https://stackoverflow.com/questions/39141997/how-can-i-use-the-compiled-dll-in-a-client-pc-without-installing-windows-sdk

2) Replace flags MD and MDd on MT and MTd accordingly

by (52 points)
0 votes

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 https://stackoverflow.com/questions/14361992/dll-load-library-error-code-126

by (28,744 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.