Open BoHomola opened 1 year ago
Note to self: Read linked merge requests before spending the morning looking into an issue.
I have successfully re-produced your error with a fresh download of llvm binaries.
"When Clang compiles C++ code for Windows, it attempts to be compatible with MSVC. There are multiple dimensions to compatibility." MSVCCompatibility
And the associated godotengine issue
adding TYPED_METHOD_BIND to the definitions solves the compile error
Godot version
4.1.1 stable
godot-cpp version
4.1.1 stable 1009da4d7e395abadfdb454cff6623e9456181c4
System information
Windows 11
Issue description
When trying to compile godot_cpp + my lib that includes godot_cpp using clang and ninja on Windows 11, when calling
godot::ClassDB::bind_method(...)
I get a compile error
On Linux CMake + Ninja + Clang works flawlessly.
I tried to look where to issue could be occurring. I found out when I remove MSVC condition from CMakeLists.txt:157
from:
to:
This effectively resolved the errors and got a successful build. Although I am not really sure if that fixes things properly and does not create issues elsewhere.
Steps to reproduce
Minimal reproduction project
N/A