Why can't I include GLM!?

Started by
5 comments, last by Ubermeowmix 10 years, 9 months ago

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

If you get near a point, make it!
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?

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.

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.

If you get near a point, make it!

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

If you get near a point, make it!

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.

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.

If you get near a point, make it!

This topic is closed to new replies.

Advertisement