MizunagiKB / gd_cubism

Unofficial Live2D Player for Godot Engine
https://mizunagikb.github.io/gd_cubism/
Other
131 stars 17 forks source link

Build error "g++" is not internal or external command, executable program, or batch file. #92

Closed silverfr0st closed 3 weeks ago

silverfr0st commented 1 month ago

If you encounter this error, try adding vsproj=yes to build comands like that:

scons platform=windows vsproj=yes arch=x86_64 target=template_debug
scons platform=windows vsproj=yes arch=x86_64 target=template_release
MizunagiKB commented 1 month ago

Thank you for reporting the situation where the compiler cannot be called correctly.

We will add a note to the documentation about this.

If it’s not too much trouble, we would appreciate it if you could provide details about the environment in which this is occurring (the Windows environment you are operating, the compiler you have installed, etc.).

silverfr0st commented 1 month ago

I tried to compile the add-on on Windows 11 Pro x64, Visual Studio Community 17.10.4 (checked "Desktop development with C++" or something like that, my system has a different default language), Python 3.10.6 x64, Scons package from the latest Python wheel package (via pip install). So I basically followed the build docs on the add-on page, but I had Python installed before and hadn't updated it to the latest 3.12.4.

However, when I tried to compile, I got an error (in the title). After looking at the official Godot documentation on building for Windows (https://docs.godotengine.org/en/stable/contributing/development/compiling/compiling_for_windows.html), I saw that when using the Visual Studio compiler you should add vsproj=yes.

MizunagiKB commented 1 month ago

@silverfr0st

Thank you for the additional information and detailed explanation. It appears that things were working well by chance in my test environment, as I only have Visual Studio installed.

I had overlooked the official documentation you referred to. Since the GDCubism documentation assumes Visual Studio as a prerequisite, it seems better to standardize on vsproj=yes.

Thank you once again for the information!

silverfr0st commented 1 month ago

You're welcome! Have a nice day!

MizunagiKB commented 4 weeks ago

@silverfr0st

A branch named _fix_vsprojbuild has been created, and the command line instructions for the build process are as follows:

scons platform=windows vsproj=yes arch=x86_64 target=template_debug
scons platform=windows vsproj=yes arch=x86_64 target=template_release

After verifying the operation locally, it will be merged into the _update_v0_61 branch and is scheduled to be released as v0.6.1.

MizunagiKB commented 4 weeks ago

This pertains to the documentation; however, the SConstruct file itself will also likely need to be updated.

MizunagiKB commented 3 weeks ago

Since development environments other than vsproj are possible, I have updated the documentation without making any assumptions. As I have confirmed the operation, I will close this issue.