Godot Version
4.2
Question
I was Following This Tutorial Video to Code with C++, But when I try build Using Scon command(5:27 of this video), i get This Long Error Message(I also tried mingw)
include/godot_cpp/core/memory.hpp: In function 'void godot::memdelete_allocator(T*)':
include/godot_cpp/core/memory.hpp:124:5: error: expected '(' before 'constexpr'
if constexpr (!std::is_trivially_destructible_v<T>) {
^~~~~~~~~
include/godot_cpp/core/memory.hpp: In function 'T* godot::memnew_arr_template(size_t, const char*)':
include/godot_cpp/core/memory.hpp:167:5: error: expected '(' before 'constexpr'
if constexpr (!std::is_trivially_destructible_v<T>) {
^~~~~~~~~
In file included from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\new:40:0,
from include/godot_cpp/templates/cowdata.hpp:41,
from include/godot_cpp/variant/char_string.hpp:34,
from gen\include/godot_cpp/variant/string.hpp:39,
from gen\include/godot_cpp/variant/string_name.hpp:38,
from include/godot_cpp/variant/callable_custom.hpp:35,
from gen\include/godot_cpp/variant/callable.hpp:38,
from gen\include/godot_cpp/variant/builtin_types.hpp:39,
from include/godot_cpp/variant/variant.hpp:36,
from include/godot_cpp/core/property_info.hpp:38,
from include/godot_cpp/core/object.hpp:38,
from src\core\object.cpp:31:
c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\exception:35:37: error: expected '}' before end of line
#pragma GCC visibility push(default)
^
c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\exception: At global scope:
c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\exception:35:37: error: expected '}' before end of line
c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\exception:35:37: error: expected declaration before end of line
scons: *** [src\variant\callable_method_pointer.windows.template_debug.x86_64.o] Error 1
=====
=====
scons: *** [src\core\object.windows.template_debug.x86_64.o] Error 1
scons: *** [src\variant\projection.windows.template_debug.x86_64.o] Error 1
scons: building terminated because of errors.
Thanks and I Really need your Help. I hope in future there be an Easier ways to use C++ in godot.