daw42 / glslcookbook

Example code for the OpenGL Shading Language Cookbook - 2nd Edition (3rd Edition now available)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build fails due to GLM/GLX experimental flags missing

DolphinDream opened this issue · comments

Compilation failed due to using glm/gtx/transform without proper enabling of the glm experimental extensions.

[ 24%] Building CXX object chapter02/CMakeFiles/chapter02.dir/scenetwoside.cpp.o
In file included from /home/marius/Downloads/glslcookbook-master/chapter02/scenetwoside.cpp:14:0:
/usr/local/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."

To fix this I added this macro to the cookbookgl.h file (which seems to be included by all other main files)

#define GLM_ENABLE_EXPERIMENTAL

My system configuration:
OS: Ubuntu 14.04 64 bit
GLM: v0.9.9.0
GLFW3: v3.2.1

commented

Thanks for the report! It looks like this was just added in GLM 0.9.9:

https://github.com/g-truc/glm/blob/master/manual.md#-74-should-i-use-gtx-extensions

I think that we should remove all use of GTX extensions. There's no need to use them. I think I just found them more convenient.

commented

As of 37903a2, I've removed all use of GTX extensions.