Open aljoscharei opened 1 month ago
Judging by the error:
error: member access into incomplete type 'tm'
__get_year(__tm->tm_year, __b, __e, __err, __ct);
and the inclusion stack, it seems that <iostream>
includes <locale>
which depends on <ctime>
but does not include it.
This almost feels like a toolchain issue, which version of XCode are you using? I wonder if Xcode 15.4 fixes it....
You can try this change and see if it compiles:
diff --git a/include/godot_cpp/core/method_bind.hpp b/include/godot_cpp/core/method_bind.hpp
index eabd6ece..f9df7b6c 100644
--- a/include/godot_cpp/core/method_bind.hpp
+++ b/include/godot_cpp/core/method_bind.hpp
@@ -43,6 +43,7 @@
#include <string>
#include <vector>
+#include <ctime>
#include <iostream>
namespace godot {
Thank you so much. Unfortunately after installing XCode 15.4 and applying the patch, no luck
Godot version
v4.3.beta3.official [82cedc83c]
godot-cpp version
master, 4.3 as of https://github.com/godotengine/godot-cpp/pull/1513
System information
macOS Ventura 13.1 (22C65)
Issue description
I try to compile a GDextension written in c++ (code found here). The code requires FFmpeg found here and the C++ bindings for Godot v4.3 found here. FFmpeg and the Godot C++ binding compile without issue individually. However, if I try to compile the entire GDExtension I get an error. I have a Mac m1 running macOs ventura 13.1.
I tried different two version of the c/c++ standard library (xcode command-line tools 13.1 and 13.3) and tried changing the compiler from clang to gcc/g++. In all cases I get the similar errors. This is the ouput for clang -cc1 version 14.0.3 (clang-1403.0.22.14.1) default target arm64-apple-darwin22.2.0
These are the last line of the error log
Steps to reproduce
My SConstruct file with irrelevant parts deleted looks like this:
Minimal reproduction project
I use https://github.com/VoylinsGamedevJourney/GoZen_GDExtension/tree/master.
GoZen_GDExtension-master-modified_SConstruct.zip
However is use current versions of godot_cpp and FFmpeg. Using the godot_cpp 4.2.2gives me an error related to iOS when I try to compile godot_cpp as described here