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

Fix missing abs declaration on Emscripten #269

Merged
merged 1 commit into from
Dec 9, 2022
Merged

Conversation

KivApple
Copy link
Contributor

@KivApple KivApple commented Dec 8, 2022

When building cglm for Emscripten the following error happen:

In file included from C:/Users/kiv/Projects/cglm/src/frustum.c:8:
In file included from C:/Users/kiv/Projects/cglm/src/../include/cglm/cglm.h:15:
C:/Users/kiv/Projects/cglm/src/../include/cglm/ivec2.h:252:13: error: call to undeclared library function 'abs' with type 'int (int)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  dest[0] = abs(v[0]);
            ^
C:/Users/kiv/Projects/cglm/src/../include/cglm/ivec2.h:252:13: note: include the header <stdlib.h> or explicitly provide a declaration for 'abs'
1 error generated.

This pull request fixes this issue.

@recp recp merged commit 8b5eaa5 into recp:master Dec 9, 2022
@recp
Copy link
Owner

recp commented Dec 9, 2022

Hi @KivApple, thanks for your contribution[s], the PR is merged 🚀

recp added a commit that referenced this pull request Dec 11, 2022
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