Replies: 3 comments 12 replies
-
I originally began my development using the MinGW that shipped with CLion (paid C IDE), which The sources linked can explain the printing problem, at least. IIRC, printing involves IO and |
Beta Was this translation helpful? Give feedback.
-
I should not matter at all which CRT Godot engine is build with, GDExtension do not pass CRT objects (like FILE) and use own memory allocation code, you should be able to use MSVC extension with MinGW build engine. But all components of the extension should be built with the same CRT and same compiler.
Loading dependencies should not have CRT involved in any way, most likely caused by missing sub-dependencies. Also, Godot is setting custom library search path, so PATH might not work, place your libs in the same folder as main extension lib.
Godot uses a lot of io redirection, so it's not necessary related to CRT. |
Beta Was this translation helpful? Give feedback.
-
We can't switch to UCRT since it's a system component only on Windows 10+, and we are still supporting Windows 7 and 8 (it's available as a redistributable, but this will create an extra dependency). |
Beta Was this translation helpful? Give feedback.
-
I’m currently building a GDExtension that depends on a UCRT library, and I’m having unexpected troubles.
After some investigation, I noted that my Godot Engine – which comes from Steam – uses MSVCRT rather than UCRT.
According to caseih @ freebasic.net, it is undefined behavior to mix MSVC and UCRT and it’s luck if it works.
The MSYS2 Environments doc § MSVCRT vs UCRT agrees and also lists several benefits of migrating away from MSVCRT.
I would like Godot Engine Windows downloads to join the future by also migrating to UCRT.
According to that MSVCRT vs UCRT section, even Microsoft Visual Studio has switched defaults.
Because UCRT is the new MSVCRT, this should be more a convenience and less a limitation.
Intriguinly, Godot also recommends VS Community to build for Windows, but it makes no mention of MSVCRT nor UCRT and the EXE is still MSVCRT. [P.S.] The source code, however, seems aware of MSVCRT vs. UCRT in a couple of places.
I may be able to find (or build) a MSVCRT version of my dependency, but I much prefer that I don’t have to downgrade. (Same for many others as well, chances are.)
Beta Was this translation helpful? Give feedback.
All reactions