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

Added missing include in io.h which adds GLM_MAX macro #257

Merged
merged 1 commit into from
Sep 11, 2022

Conversation

Rokannon
Copy link
Contributor

Macro GLM_MAX is used in io.h but the header-file which defines it is not included. This PR fixes that. Example of code which does not compile:

#define CGLM_DEFINE_PRINTS
#include "cglm/io.h"
#include "cglm/mat3.h"
#include <stdio.h>

int main(void) {
  mat3 x = GLM_MAT3_IDENTITY_INIT;
  glm_mat3_print(x, stdout);
  return 0;
}

Compile command:

clang -I <path-to-cglm-includes> <path-to-libcglm.a> main.c

Note that including the missing header file in the main file is extra-brittle because clang-format -i main.c will move util.h below io.h.

@recp recp merged commit a3186a7 into recp:master Sep 11, 2022
@recp
Copy link
Owner

recp commented Sep 11, 2022

Hi @Rokannon, thanks for your contribution, the PR is merged 🚀

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