use GLM library

When In try to load the GLM library, I get following error. Although I have included it in the header file as -- #include <glm/glm.hpp>  .

And also, as per the instruction on the GLM website, I have extracted the library in my project folder. Can anyone please help me out?

 

ERROR message:

"C:\Program Files (x86)\JetBrains\CLion 2016.2.1\bin\cmake\bin\cmake.exe" --build C:\Users\Lenovo\.CLion2016.2\system\cmake\generated\PLY_Loader-master-f48f7b07\f48f7b07\Debug --target PLY_Loader_master -- -j 4
Scanning dependencies of target PLY_Loader_master
[ 50%] Building CXX object CMakeFiles/PLY_Loader_master.dir/plyloader.cpp.obj
In file included from C:\Users\Lenovo\ClionProjects\PLY_Loader-master\plyloader.cpp:31:0

C:\Users\Lenovo\ClionProjects\PLY_Loader-master\plyloader.h:30:23: fatal error: glm/glm.hpp: No such file or directory
 #include <glm/glm.hpp>
                       ^
compilation terminated.
CMakeFiles\PLY_Loader_master.dir\build.make:61: recipe for target 'CMakeFiles/PLY_Loader_master.dir/plyloader.cpp.obj' failed
mingw32-make.exe[3]: *** [CMakeFiles/PLY_Loader_master.dir/plyloader.cpp.obj] Error 1
mingw32-make.exe[2]: *** [CMakeFiles/PLY_Loader_master.dir/all] Error 2
CMakeFiles\Makefile2:66: recipe for target 'CMakeFiles/PLY_Loader_master.dir/all' failed
CMakeFiles\Makefile2:78: recipe for target 'CMakeFiles/PLY_Loader_master.dir/rule' failed
mingw32-make.exe[1]: *** [CMakeFiles/PLY_Loader_master.dir/rule] Error 2
mingw32-make.exe: *** [PLY_Loader_master] Error 2
Makefile:117: recipe for target 'PLY_Loader_master' failed

1 comment
Comment actions Permalink

Hi!

Please check that you've added GLM library to CMakeLists.txt.

We advise to write or find online FindXXX.cmake scripts (for example, the one for GLM can be copied from here: https://github.com/Groovounet/glm-deprecated/blob/master/util/FindGLM.cmake). After that you can properly set up libraries using find_package(glm).

 

0

Please sign in to leave a comment.