Error using OpenGL GLM GTX library

1

I am trying to compile in Ubuntu Linux a project that uses the quaternions to rotate 3D objects in the glui library, when I compile the code the system reports the following error:

The Code says that the error has something to do with the GLM / GTX library in transform.hpp and quaternion.hpp

I have no idea how to solve I need help! Many thanks.

Thefollowingistheerror:

Infileincludedfromcamera.h:18:0,                 fromcamera.cpp:2:/usr/include/glm/gtx/transform.hpp:23:3:error:#error"GLM: GLM_GTX_transform is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it it. "  # error "GLM_GTX_transform is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."    ^ ~~~~ In file included from /usr/include/glm/gtx/quaternion.hpp:20:01,                  from camera.h: 20,                  from camera.cpp: 2: /usr/include/glm/gtx/norm.hpp:21:3: error: #error "GLM: GLM_GTX_norm is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it it. "  # error "GLM: GLM_GTX_norm is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."    ^ ~~~~ In file included from camera.h: 20: 0,                  from camera.cpp: 2:

    
asked by anonymous 05.06.2018 / 22:59

1 answer

1

The error indicates that you are trying to use experimental GTX extensions and for this , you must set a macro to enable the use of these extensions before including them in the code.

To fix the problem, set the macro below in the camera.h , before file to include the extension header files:

#define GLM_ENABLE_EXPERIMENTAL

If there are other places where you use these extensions, set the same macro before uploading them.

Please note that, as documented, these extensions are not recommended and are subject to change in the future.

    
06.06.2018 / 01:59