Why does Godot have to make it really complicated to set up the ability to use C++?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Joe0239
:warning: Old Version Published before Godot 3 was released.

According to this article » Building a GDNative Library on Windows Joseph's Blog

Why is it so difficult to just to set up the ability to use C++ In Godot 3.0? Users are able to just create a GDScript with ease but for some reason if a user wants to use C++ they have to do a whole lot just to get it to work, I wish that everything just comes straight out of the box

Please so correct me if I am wrong.

:bust_in_silhouette: Reply From: hungrymonkey

The linked guide is meant to set up gdnative.

Here is the link. GDNative is meant to extend your engine. It is not meant to script your game

GDScript is meant to write scripts. The only other alternative to GDScript is C#.

Thanks for your help :slight_smile:

So what is NativeScript then (as shown in the image)?
enter image description here

Joe0239 | 2017-12-20 07:11

Technically, nativescript is how you can script with c++

Why does Godot have to make it really complicated to set up the ability to use C++? · Issue #14856 · godotengine/godot · GitHub

However, I do not think everything is exposed via nativescript so it will not be a replacement.

To answer your first question, gdnative was created because C++ modules requires you compile the whole engine. If you used gdnative, all c++ needs to do is compile the bindings only.

hungrymonkey | 2017-12-20 07:21

So if you used NativeScript, you can’t use all the Godot’s APIs, am I correct? Are you 100% certain about this?

Is Godot eventually allow NativeScript to support everything and be a replace to GDScript?

When I created NativeScript and attached it to an object, and when I went to the Script mode, I got this error, can you please check it out and tell me what it means please? Thanks :slight_smile:

Joe0239 | 2017-12-20 07:39

GDNative gives you access to the API used by GDScript.
The gdns file is just a kind of link, without this Godot can’t find your scripts. You must code into your favorite IDE and compile using the build script provided by the binding.

DriNeo | 2017-12-21 17:29