GLM compile error


I’ve been struggling with this for hours.
Trying to run the OpenGL Mathematics class (GLM) for the first time on Linux.

The source code (simple as can be):

#include <stdlib.h>
#include <glm/glm.hpp>

using namespace glm;
int main(int argc, char
* argv) {

return (EXIT_SUCCESS);


The error messages:
/usr/local/include/glm/./core/func_vector_relational.hpp: In function ‘vecType<bool> glm::core::function::vector_relational::not_(const vecType<bool>&)’:
In file included from /usr/local/include/glm/glm.hpp:107,
/usr/local/include/glm/./core/func_vector_relational.hpp:174: error: expected nested-name-specifier
/usr/local/include/glm/./core/func_vector_relational.hpp:174: error: expected ‘(’
/usr/local/include/glm/./core/func_vector_relational.hpp:174: error: expected ‘;’
/usr/local/include/glm/./core/func_vector_relational.hpp:176: error: ‘Result’ was not declared in this scope
/usr/local/include/glm/./core/func_vector_relational.hpp:177: error: ‘Result’ was not declared in this scope
make[2]: *** [build/Debug/GNU-Linux-x86/main.o] Error 1

Do I need to link some library maybe? A special include path?
(I only include /usr/local/glm, nothing else).

Any help will be most appreciated.

Thanks a lot


You are apparently using GLM 0.9 alpha 2 and this is a problem already reported and fixed.

Delete not_ declaration and implementation as a quick fix.

It will be fixed in next release.

The last stable release is GLM

Thanks for the reply.

But the same happened to me on the stable release as well.

Can you offer another fix?

Thanks a lot

The problem isn’t present in GLM

Make sure to delete GLM 0.9 alpha 2 files before copying GLM files