The command line is too long? (Scons linking issue with MinGW-w64 when compiling GDNative C++.)

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

My Specs:
Dell Latitude E6430
Windows 10 Pro version 1909
Latest Release and Updates MSYS2 w/ MinGW-w64 for C++ Development
Python 3.8.0 w/ Pip, Scons and Pywin32 already installed and updated
Custom Build of Godot 3.1.2 stable release

Python3 and MinGW-w64 are already included in the environment path. I have already generated the custom api.json file from my Godot build.

This is my directory’s structure.

This was the command I used to compile GDNative C++ with Scons for MinGW-w64:

scons p=windows generate_bindings=yes bits=64 use_mingw=true use_custom_api_file=yes custom_api_file=C:/gdnative_cpp_example/api.json target=release

I followed documentations tutorial and used to godot-cpp and godot_headers that work with Godot 3.1.x, but got bumped at here:

Which was cause by linking issue with Scons and MinGW-w64. I found this to be the solution:

I tried all I could, yet have no idea on how to execute it. Can someone please help?

:bust_in_silhouette: Reply From: Jaxen Fyrsu

I found the solution to use CMake instead. Take a look at the compiled file.

I also replaced the original api.json with my custom one in godot_headers to be certain it worked with my build of Godot.

Would this be alright as an alternative compared to compiling with Scons?

Jaxen Fyrsu | 2020-01-08 04:29