Error using Opengl GTX GLM library

Asked

Viewed 96 times

1

I’m trying to compile in linux Ubuntu a project that uses the quaternions for rotation of 3D objects of the glui library, when I compile the code the system accuses the following error :

Code says the bug has something to do with the GLM/GTX library in Transform.hpp and quaternion.hpp

I have no idea how to solve need help ! Thank you very much.

ERRO AO COMPILAR CÓDIGO COM QUATERNION

Follow the excerpt from the error :

In file included from camera. h:18:0, from camera.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." # 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." ~~~ In file included from /usr/include/glm/Gtx/quaternion.hpp:20:0, 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." # 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:

  • 1

    You can put the error in text here too ? Not only is it easier to read than in this transparent background, but it is also searchable.

  • Yes there is, thank you very much.

1 answer

1


Error indicates you are trying to use extensions GTX experimental and, for this, it is necessary to define a macro to enable the use of these extensions before including them in the code.

To resolve the issue, set the macro below in the file camera.h, before include the header files of the extensions:

#define GLM_ENABLE_EXPERIMENTAL

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

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

  • Our you are hem beast ! Thank you very much. What a simple line of code doesn’t hem ? . Thanks!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.