forked from icaven/glm
- Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Description
Define GLM_EXTERNAL_TEMPLATE in the header file, and enter the code in a cpp file:
pch.h:
#define GLM_EXTERNAL_TEMPLATE // #define GLM_SILENT_WARNINGS // ??? #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/quaternion.hpp> #include <glm/gtc/type_ptr.hpp> #include <glm/ext.hpp> #include <glm/gtx/intersect.hpp> #include <glm/gtx/io.hpp> #include <glm/gtx/matrix_decompose.hpp> #include <glm/gtx/normal.hpp> #include <glm/gtx/quaternion.hpp> #include <glm/gtx/rotate_vector.hpp> #include <glm/gtx/vector_angle.hpp> glm_imp.cpp:
#undef GLM_EXTERNAL_TEMPLATE #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/quaternion.hpp> #include <glm/gtc/type_ptr.hpp> #include <glm/ext.hpp> #include <glm/gtx/intersect.hpp> #include <glm/gtx/io.hpp> #include <glm/gtx/matrix_decompose.hpp> #include <glm/gtx/normal.hpp> #include <glm/gtx/quaternion.hpp> #include <glm/gtx/rotate_vector.hpp> #include <glm/gtx/vector_angle.hpp> compilation produces many errors.

x:\include\glm\ext\quaternion_geometric.inl:7: error: 'call' is not a member of 'glm::detail::compute_dot<glm::qua<float, (glm::qualifier)0>, float, false>' return detail::compute_dot<qua<T, Q>, T, detail::is_aligned<Q>::value>::call(x, y); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ And in the process of gcc compilation, there will be many warnings that lead to too much output:
x:\include\glm\detail\type_vec2.hpp:108: warning: inline function 'constexpr glm::vec<2, T, Q>::vec(T) [with T = float; glm::qualifier Q = (glm::qualifier)0]' used but never defined GLM_CTOR_DECL explicit vec(T scalar); ^~~ Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels