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
I'm updating GLM from 0.9.5 to 0.9.7.3 and I'm getting a lot of undefined reference errors.
There seem to be duplicate declarations (the exact same function is declared twice, but only defined once), as well as some actual undefined references (i.e. there's a declaration, but no definition).
I'm using SWIG to generate Lua wrappers for GLM, so most template functions are actually instantiated, where they would regularly just not be compiled unless you use them (and you probably wouldn't get any of these errors).
SWIG can't handle all C++ templates, so I could be barking up the wrong tree for some these. Here's an example of some of the errors:
glm/detail/type_vec4.hpp has 5 declarations for operator*:
And sure enough, I'm getting undefined reference errors for the 2 missing definitions:
obj/Release/HactEngine/swig_glm_wrap1.o: In function`_wrap___mul__SWIG_157':
/home/sami/IndiumGames/Infamis/engine/build/Release/swig_glm_wrap.cxx:125790: undefined reference to `glm::tvec4<float, (glm::precision)0> glm::operator*<float, (glm::precision)0>(glm::tvec4<float, (glm::precision)0> const&, glm::tvec1<float, (glm::precision)0> const&)'obj/Release/HactEngine/swig_glm_wrap1.o: In function `_wrap___mul__SWIG_159':/home/sami/IndiumGames/Infamis/engine/build/Release/swig_glm_wrap.cxx:125854: undefined reference to `glm::tvec4<float, (glm::precision)0> glm::operator*<float, (glm::precision)0>(glm::tvec1<float, (glm::precision)0> const&, glm::tvec4<float, (glm::precision)0> const&)'
I'm getting 6 of these errors from type_vec4.hpp alone. I'm working my way through the errors as the compiler (g++ 5.2.1) gives them, and I'll report back with a full list of the errors soon.
Should the declarations be removed, or are the definitions actually missing? If the declarations should be removed, I could make a PR. But if the definitions are missing, I'd rather just give you a list (I'd be in over my head trying to write the definitions).
The text was updated successfully, but these errors were encountered:
The ones I've listed above seem to have missing definitions (other vector types have similar functions defined), some of the errors are because of duplicate declarations (2 declarations for the same function) and there's even one "typo", where the declaration is different from the definition.
I'm currently using GLM 0.9.7.3, but looking at the source code, I don't think these are fixed in master either. I'll fork and open a PR, hopefully during this weekend.
I'm updating GLM from 0.9.5 to 0.9.7.3 and I'm getting a lot of undefined reference errors.
There seem to be duplicate declarations (the exact same function is declared twice, but only defined once), as well as some actual undefined references (i.e. there's a declaration, but no definition).
I'm using SWIG to generate Lua wrappers for GLM, so most template functions are actually instantiated, where they would regularly just not be compiled unless you use them (and you probably wouldn't get any of these errors).
SWIG can't handle all C++ templates, so I could be barking up the wrong tree for some these. Here's an example of some of the errors:
glm/detail/type_vec4.hpp
has 5 declarations foroperator*
:But
glm/detail/type_vec4.inl
only has 3 definitions:And sure enough, I'm getting
undefined reference
errors for the 2 missing definitions:I'm getting 6 of these errors from
type_vec4.hpp
alone. I'm working my way through the errors as the compiler (g++ 5.2.1) gives them, and I'll report back with a full list of the errors soon.Should the declarations be removed, or are the definitions actually missing? If the declarations should be removed, I could make a PR. But if the definitions are missing, I'd rather just give you a list (I'd be in over my head trying to write the definitions).The text was updated successfully, but these errors were encountered: