You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue happens if you try to use the glm::mat4 constructor of glm::quat, when using glm as a module under Visual Studio 2022. I've tried it with the latest GLM version (45008b2).
Code:
import glm;
intmain(int argc, char* argv[]) {
glm::mat4 m;
glm::quat q{ m };
return0;
}
I've set up a test repository for replicating the problem: https://github.com/Silverlan/test_glm_module
Simply clone the repository (with submodules) and run the build.bat, or fork the repository and check the workflow output.
The line glm::quat q{ m }; causes this error:
D:\a\test_glm_module\test_glm_module\glm_cxxmodule\glm\glm\detail\type_quat.inl(240,11): error C3861: 'quat_cast': identifier not found [D:\a\test_glm_module\test_glm_module\build\glm_test.vcxproj]
(compiling source file '../main.cpp')
D:\a\test_glm_module\test_glm_module\glm_cxxmodule\glm\glm\detail\type_quat.inl(240,11):
'quat_cast': function was not declared in the template definition context and can be found only via argument-dependent lookup in the instantiation context
D:\a\test_glm_module\test_glm_module\glm_cxxmodule\glm\glm\detail\type_quat.inl(240,11):
the template instantiation context (the oldest one first) is
D:\a\test_glm_module\test_glm_module\main.cpp(5,12):
see reference to class template instantiation 'glm::qua<float,glm::packed_highp>' being compiled
D:\a\test_glm_module\test_glm_module\glm_cxxmodule\glm\glm\detail\type_quat.inl(239,2):
while compiling class template member function 'glm::qua<float,glm::packed_highp>::qua(const glm::mat<4,4,glm::f32,glm::packed_highp> &)'
D:\a\test_glm_module\test_glm_module\main.cpp(5,13):
see the first reference to 'glm::qua<float,glm::packed_highp>::qua' in 'main'
If you call glm::gtc::quat_cast directly instead of using the constructor, the error vanishes:
The issue happens if you try to use the
glm::mat4
constructor ofglm::quat
, when using glm as a module under Visual Studio 2022. I've tried it with the latest GLM version (45008b2).Code:
I've set up a test repository for replicating the problem: https://github.com/Silverlan/test_glm_module
Simply clone the repository (with submodules) and run the
build.bat
, or fork the repository and check the workflow output.The line
glm::quat q{ m };
causes this error:If you call
glm::gtc::quat_cast
directly instead of using the constructor, the error vanishes:The text was updated successfully, but these errors were encountered: