The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

Is Windows 10 build of C++ bindings for Native script, broken? Or am I somehow missing something?

  • I tried with default godot_api.json (including in repo)

    • It also failed with one generated from Godot 3.2.3. I'll upload those logs if needed as well

Failure log:
https://gist.github.com/Razzlegames/6652b0cb44a6915724f59539778a88b3

Error:

src\core\String.cpp(102): error C2440: 'return': cannot convert from 'const wchar_t' to 'wchar_t &'

Using:

  • godot-cpp branch: nativescript-1.1

  • Visual Studio 2019 power shell, with compiler:

    PS C:\Users\razzl\Development\Godot\gdnativecppexample\godot-cpp> cl -version
    Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29112 for x86
    Copyright (C) Microsoft Corporation. All rights reserved.

    cl : Command line warning D9002 : ignoring unknown option '-version'
    cl : Command line error D8003 : missing source filename
    PS C:\Users\razzl\Development\Godot\gdnativecppexample\godot-cpp>

Also side issue is: I have mingw 64 in PATH but using the scons flag (use_mingw=true) doesn't actually use g++ as expected. I tried this as an alternative. ( I didn't attempt to fix the build script or dive into any of that yet)

Log of failure to use mingw:

Please note, the use of g++ in end of log to show it's in the path.
https://gist.github.com/Razzlegames/196e41a612d415c946653e82e474bf2a

Thanks,
Kyle

Godot version Godot 3.2.3
in Engine by (32 points)

1 Answer

+1 vote
Best answer

godot-cpp bindings, 3.2 branch is actually stable and works. The README and docs just need to be updated as it implies that nativescript-1.1 is the baseline branch for 3.1 and above.

It could be a great idea to improve this process by using Docker build containers that contain all GDNative dependencies for all stable releases. E.g. one for 3.1, 3.2.x etc. It would avoid fiddling with what submodule branch to be on, what compilers don't have issues (with conversion above), etc.

It would make the process repeatable and fool proof, in my opinion as everything you need to build would be within the container.

by (32 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 Frequently asked questions and 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 [email protected] with your username.