Skip to content

I macro is used as variable name in new vec_reflect / vec_refract functions #404

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

Closed
olifre opened this issue Mar 30, 2024 · 3 comments
Closed
Labels

Comments

@olifre
Copy link

olifre commented Mar 30, 2024

Including complex.h from standard C (see https://en.cppreference.com/w/c/numeric/complex ) defines the macro I, which causes issues with the variable name I used starting with CGLM 0.9.3.

See for example:

In file included from ../src/util/compat.h:13,
                 from ../src/taisei.h:13,
                 from ../src/boss.c:9:
../subprojects/cglm/include/cglm/vec2.h:725:23: error: expected ‘)’ before ‘__extension__’
  725 | glm_vec2_reflect(vec2 I, vec2 N, vec2 dest) {
      |                       ^
In file included from ../subprojects/cglm/include/cglm/cglm.h:12,
                 from ../src/util/glm.h:20,
                 from ../src/boss.c:17:
../subprojects/cglm/include/cglm/vec2.h:725:26: error: expected ‘;’, ‘,’ or ‘)’ before ‘vec2’
  725 | glm_vec2_reflect(vec2 I, vec2 N, vec2 dest) {
      |                          ^~~~

in one program using CGLM and including complex.h before.

@recp
Copy link
Owner

recp commented Mar 31, 2024

Hi @olifre,

Wow, thanks for reporting this, I tried to fix this at #406 and new Release will be soon.

@recp recp added the bug label Mar 31, 2024
gentoo-bot pushed a commit to gentoo/guru that referenced this issue Mar 31, 2024
The incompatibility problem will be fixed in the upcoming cglm release,
see recp/cglm#404 .

Signed-off-by: Oliver Freyermuth <[email protected]>
@recp
Copy link
Owner

recp commented Mar 31, 2024

@olifre the PR is merged I think the issue was dissolved. v0.9.4 will be released soon which will contain this bugfix.

@recp
Copy link
Owner

recp commented Apr 1, 2024

The issue is fixed at v0.9.4: https://github.com/recp/cglm/releases

Thanks for reporting this

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

No branches or pull requests

2 participants