Mac Big Sur C++ OpenGL attempting to learn quaternions from a tutorial.
The gtx headers are under usr/local/include/glm.
Can anyone figure out what is wrong with my header includes or header search path? Thanks.
Minimum reproducible code that fails for this issue:
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdocumentation"
#define GLEW_STATIC
#include <GL/glew.h>
#include <GLFW/glfw3.h> // for window and keyboard
#include <iostream>
#include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/quaternion.hpp>
#include <glm/gtx/quaternion.hpp>
int main ( void )
{
float t =1.0;
// http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-17-quaternions/
glm::vec3 RotationAxis(0.0f,1.0f,0.0f);
float RotationAngle = 90 * t;
glm::quat MyQuaternion;
MyQuaternion = gtx::quaternion::angleAxis(glm::degrees(RotationAngle), RotationAxis);
return 0;
}
The build error:
Use of undeclared identifier 'gtx'
which occurs on the line with gtx.
My Build Phases / Header Search Paths / Debug / Any Architecture:
/usr/local/include
/usr/local/include/glm
/usr/local/include/glm/gtx
/usr/local/Cellar
/glew/2.2.0_1/include/GL
/usr/local/Cellar
/glfw/3.3.4/include/GLFW
/usr/local/include/glad/include
My Library Search Paths: $(inherited) /usr/local/Cellar/glew/2.2.0_1/lib /usr/local/Cellar/glfw/3.3.4/lib /usr/local/include /usr/local/include/glad/include