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

Build Errors with GLM 1.0.0 #2111

Open
jstsmthrgk opened this issue May 19, 2024 · 2 comments
Open

Build Errors with GLM 1.0.0 #2111

jstsmthrgk opened this issue May 19, 2024 · 2 comments

Comments

@jstsmthrgk
Copy link
Contributor

jstsmthrgk commented May 19, 2024

Appearantly some features are now gated behind a feature flag and have to be enable with

#define GLM_ENABLE_EXPERIMENTAL

before including, i came upon this issue as I tried to get the new version to compile on Arch Linux, I found the stopgap solution for building here: NixOS/nixpkgs#308253 (comment) (i.e. passing -DCMAKE_CXX_FLAGS=-DGLM_ENABLE_EXPERIMENTAL to cmake) but it should probably just be put into the code itself.

@oznogon
Copy link
Contributor

oznogon commented May 19, 2024

error "GLM: GLM_GTX_component_wise is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."

invoked:

GLM_GTX_component_wise
GLM_GTX_norm
GLM_GTX_quaternion

all errors via:

In file included from /home/oznogon/git/daid/EmptyEpsilon/_build/_deps/glm-src/glm/gtx/norm.hpp:19,
                 from /home/oznogon/git/daid/SeriousProton/src/vectorUtils.h:7,
...
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: SeriousProton/src/vectorUtils.h
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ #ifndef SFML_EXTRA_VECTOR_UTILS_H
   2   │ #define SFML_EXTRA_VECTOR_UTILS_H
   3   │ 
   4   │ #include <math.h>
   5   │ 
   6   │ #include <glm/geometric.hpp> //for glm::lenght and glm::dot
   7  >> #include <glm/gtx/norm.hpp>  //for glm::lenght2
   8   │ 

glm/gtx/norm.hpp also invoked in EmptyEpsilon/src/mesh.cpp and particleEffect.cpp

@daid
Copy link
Owner

daid commented May 22, 2024

I haven't checked how much of GLM we are using, but I might consider replacing it. I've seen in another project that it adds a significant amount of compile time for something that we mainly use as a few structs with overloaded operators.

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

No branches or pull requests

3 participants