PDA

View Full Version : GLM compile error



fiooer
03-17-2010, 03:29 AM
Hi,

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>&amp;)’:
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

fiooer

Groovounet
03-17-2010, 08:06 AM
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 0.8.4.4 (https://sourceforge.net/projects/glf/files/glm/glm-0.8.4.4/glm-0.8.4.4.zip/download).

fiooer
03-18-2010, 02:48 AM
Thanks for the reply.

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

Can you offer another fix?

Thanks a lot
fiooer

Groovounet
03-18-2010, 04:02 AM
The problem isn't present in GLM 0.8.4.4.

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

Thanks