c++xcodeopenglglm-math

glm/glm.hpp file not found in Xcode 5


From my project in Xcode, I chose 'add files to project' and selected the entire glm sub-folder (which I have been told is all you need to use glm). Then, in my main.cpp file, I wrote #include glm.hpp to receive the error glm/glm.hpp file not found from the glm.cpp file.

Has anyone else had this problem? It is supposedly a header-only library, which means I dont have to add any include paths, right?


Solution

  • Update "Header Search Path" in xcode to include your "glm-0.9.5" directory.

    Project->Build Settings->Search Paths->Header Search Paths
    

    ( In my case, I have added "/Users/me/work/glm-0.9.5" )