Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add C4_MINGW macro for rapidyaml 0.7.0 #139

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

toge
Copy link
Contributor

@toge toge commented Jun 25, 2024

Thanks for providing such a very fast libraries!
In mingw64 compiler, there are compilation errors on rapidyaml 0.7.0:

In file included from src/c4/yml/tree.hpp:12,
                 from src/c4/yml/reference_resolver.hpp:4,
                 from src/c4/yml/reference_resolver.cpp:1:
src/c4/yml/common.hpp:14:10: fatal error: alloca.h: No such file or directory
   14 | #include <alloca.h>
      |          ^~~~~~~~~~
compilation terminated.

This is due to the lack of alloca.h in the mingw compiler as well as in the MSVC compiler.
I want to add C4_MINGW macro to c4core so that rapidyaml uses malloc.h instead of alloca.h on mingw.

#if defined(C4_MSVC) || defined(C4_MINGW)
#include <malloc.h>
#else
#include <alloca.h>
#endif

This same fix is also implemented in imgui.
ocornut/imgui#276

@toge toge changed the title add C4_MINGW macro for rapidyaml 0.7.0 Please add C4_MINGW macro for rapidyaml 0.7.0 Jun 25, 2024
@biojppm
Copy link
Owner

biojppm commented Jun 25, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants