• Advertisement
Sign in to follow this  

Why can't I include GLM!?

This topic is 1671 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Really have no idea why it isn't picking up on this header only library!

 

#include <glm/glm.hpp>

 

it says in the help file that I just need to add the include, but it's throwing the error:

 

fatal error C1083: Cannot open include file: 'glm/glm.hpp': No such file or directory

Share this post


Link to post
Share on other sites
Advertisement

You need to place the glm-directory where the compiler is actually looking for it. Where have you placed it, and what is the paths you have added to the project settings so that the compiler can actually find it?

Share this post


Link to post
Share on other sites

Looks like you haven't configured your include paths, hence VS couldn't find the file in question. To set the include directories up in Visual Studio 2010+ you will need to go Project->Properties...->Configuration Properties->VC++ Directories->Include Directories and click the arrow at the end of the input box. Make sure you select 'All Configurations' from the Configuration combo box at the top of the properties page to apply these settings to both the Debug and Release builds. For older versions of VS it's the same process but IIRC the include directories etc. is not part of the project settings but part of the VS settings.

Share this post


Link to post
Share on other sites

If it's only header only, do I need to include it? and if so under where in VC++ directories?

 

it doesn't work if you add glm to Linker->general->Additional library directories.

Share this post


Link to post
Share on other sites

 To set the include directories up in Visual Studio 2010+ you will need to go Project->Properties...->Configuration Properties->VC++ Directories->Include Directories and click the arrow at the end of the input box. Make sure you select 'All Configurations' from the Configuration combo box at the top of the properties page to apply these settings to both the Debug and Release builds. For older versions of VS it's the same process but IIRC the include directories etc. is not part of the project settings but part of the VS settings.

Did that as well... Zippo! Nadda! Nichts!

 

Plus I didn't miss 'All Configurations' bit either :S

Edited by Ubermeowmix

Share this post


Link to post
Share on other sites

Did you add the GLM-root directory to the incldue path, or did you add the glm/ subdirectory within the GLM root-directory? Note in your include statement that it has the glm/ subdirectory in it already, so you need to add the GLM root-directory to the search path.

Share this post


Link to post
Share on other sites

Just the main directory yup, I didn't select the sub directory :S it's slightly frustrating lol.

 

Ah ha, even though I didn't add the root when I removed glm/ from the glm/glm.hpp it accessed the folder! seems it didn't need it.

 

Plus when I removed the include files it didn't need them either, it was just the folder definition aiming at the wrong folder! Too specific in the end lol.

 

Thanks Brother Bob, you da man.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement