EmptyEpsilon icon indicating copy to clipboard operation
EmptyEpsilon copied to clipboard

Build Errors with GLM 1.0.0

Open jstsmthrgk opened this issue 1 year ago • 2 comments
trafficstars

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: https://github.com/NixOS/nixpkgs/pull/308253#issuecomment-2106371795 (i.e. passing -DCMAKE_CXX_FLAGS=-DGLM_ENABLE_EXPERIMENTAL to cmake) but it should probably just be put into the code itself.

jstsmthrgk avatar May 19 '24 19:05 jstsmthrgk

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

oznogon avatar May 19 '24 21:05 oznogon

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.

daid avatar May 22 '24 07:05 daid