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

Automatic handling for -D_Bool=bool where required #103

Merged
merged 4 commits into from
Dec 13, 2024
Merged

Conversation

mappu
Copy link
Owner

@mappu mappu commented Dec 12, 2024

Fixes: #102

Updates: #73

Some platforms using a new version of Clang seem to require -D_Bool=bool in the CGO_CXXFLAGS. Replace this with an #ifndef _Bool ; #define _Bool bool in the .cpp files directly.

The issue is caused because Miqt needs to import Cgo's generated C file, which uses the C-specific _Bool type, which is not defined in the C++ standard.

There exists stdbool.h / cstdbool for C users, to define bool in terms of _Bool, but Miqt needs the opposite.

Presumably this used to work on older Clang and works on GCC because of a different (less strict?) set of standard definitions.

Reviewed-By: @FalcoG in #102 (comment)

@mappu mappu changed the title Draft: Automatic handling for -D_Bool=bool where required Automatic handling for -D_Bool=bool where required Dec 13, 2024
@mappu mappu merged commit b31a1e3 into master Dec 13, 2024
10 checks passed
@mappu mappu deleted the miqt-automatic-bool branch December 13, 2024 21:21
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.

Build error: "unknown type name '_Bool'" when using macOS
1 participant