0

I have been trying to test my C++ codes in Xcode. As a result, the errors say

"Undefined symbols for architecture x86_64" which it refers to the ".o" files

Why Xcode tries to link the .o files which are automatically generated in derived data, not the .cpp files where those errored functions are declared? Have you come across the errors?

And glm is a static library. Why the issues occur because of glm itself? (I'm wondering)

  "double glm::dot<double, (glm::qualifier)0>(glm::tquat<double, (glm::qualifier)0> const&, glm::tquat<double, (glm::qualifier)0> const&)", referenced from:

      double glm::length<double, (glm::qualifier)0>(glm::tquat<double, (glm::qualifier)0> const&) in glm.o

  "double glm::dot<double, (glm::qualifier)1>(glm::tquat<double, (glm::qualifier)1> const&, glm::tquat<double, (glm::qualifier)1> const&)", referenced from:

      double glm::length<double, (glm::qualifier)1>(glm::tquat<double, (glm::qualifier)1> const&) in glm.o

  "double glm::dot<double, (glm::qualifier)2>(glm::tquat<double, (glm::qualifier)2> const&, glm::tquat<double, (glm::qualifier)2> const&)", referenced from:

      double glm::length<double, (glm::qualifier)2>(glm::tquat<double, (glm::qualifier)2> const&) in glm.o

  "float glm::dot<float, (glm::qualifier)0>(glm::tquat<float, (glm::qualifier)0> const&, glm::tquat<float, (glm::qualifier)0> const&)", referenced from:

      float glm::length<float, (glm::qualifier)0>(glm::tquat<float, (glm::qualifier)0> const&) in glm.o

  "float glm::dot<float, (glm::qualifier)1>(glm::tquat<float, (glm::qualifier)1> const&, glm::tquat<float, (glm::qualifier)1> const&)", referenced from:

      float glm::length<float, (glm::qualifier)1>(glm::tquat<float, (glm::qualifier)1> const&) in glm.o
genpfault
  • 51,148
  • 11
  • 85
  • 139
  • Does this answer your question? [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Alan Birtles Feb 19 '20 at 02:58
  • I've changed the library path but it does not work – Flotery Extadives Feb 19 '20 at 03:57

0 Answers0