how do i setup the GLM Library in visual studio 2012?
first i tried extract the glm librar directory to my VS 2012 project directory (the directory containing the glm library is named glm-0.9.4.4). then i tried to add glm-0.9.4.4 to
PROJECT -> properties -> VC++ directories -> Include Directories
and then when i tried to use the include #include <glm/glm.hpp>
in my code i got the following error:
fatal error C1083: Cannot open include file: 'glm/glm.hpp': No such file or directory
how do i set up the GLM library correctly to work in my code?
GLM is written as a platform independent library with no dependence and officially supports the following compilers: GCC 3.4 and higher. LLVM 2.3 and higher. Visual Studio 2005 and higher.
Go to https://glm.g-truc.net/0.9.9/index.html and download glm. Drag it (or copy and paste) from the window is downloaded into folder C:\OpenGL. Now in folder OpenGL you have glm and at least one toolkit.
I succeeded in solving the problem. to add the GLM library to the include path, I did the following steps:
C:\projects\myProject
then extracted the glm code to this path (C:\projects\myProject
).C:\projects\myProject\glm-0.9.4.4
of the glm directory to:
=> right click on project in the solution viewer => from the drop down menu choose properties => C\C++ => General => Additional Include Directories.
C:\projects\myProject\glm-0.9.4.4
in the edit box of Additional Include Directories.Another option if you don't want to use full path for the glm library (or any other library you want to include in you project in general), is to use the path .\glm-0.9.4.4
instead of the full path (this will work only if you extracted the glm library to the project directory!)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With