cglm icon indicating copy to clipboard operation
cglm copied to clipboard

cglm_vec4_ucopy not defined inside cglm/mat2.h

Open m4reQ opened this issue 1 year ago • 1 comments

Function glm_mat2_copy from cglm/mat2.h internally uses glm_vec4_ucopy, defined inside cglm/vec4.h, which is not included. THis leads to symbol not being found. Minimal example:

#include <cglm/mat2.h>

void foo() {
    mat2 x, y;
    glm_mat2_copy(x, y);
}

This will result in a error LNK2019: unresolved external symbol _glm_vec4_ucopy referenced in function _glm_mat2_copy on MSVC.

A simple solution for this is to just add #include <cglm/vec4.h> into the cglm/mat2.h file.

m4reQ avatar Jul 23 '24 13:07 m4reQ

Hi @m4reQ,

Sorry for the delay and thanks for the solution.

I think we should check other headers too and fix all related issues.

A PR would be nice otherwise I can fix this asap

recp avatar Aug 01 '24 20:08 recp