`I` macro is used as variable name in new vec_reflect / vec_refract functions
olifre opened this issue Β· comments
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.
@olifre the PR is merged I think the issue was dissolved. v0.9.4 will be released soon which will contain this bugfix.
The issue is fixed at v0.9.4: https://github.com/recp/cglm/releases
Thanks for reporting this