Reputation: 41
I am attempting to use GLM to work with Vulkan/SDL. I have both of those working correctly, however when I select build, it says that
/usr/include/c++/7.1.1/cmath:45: error: math.h: No such file or directory
#include_next <math.h>
^~~~~~~~
However if I were to go into my project and just include it normally, it works fine. I tried using G++ instead of GCC. I'm on Linux(arch) and using QT Creator QT version 5.9.1 . I'm using Qmake, but no Qt libraries. The GLM code im using is
glm::mat4 matrix;
glm::vec4 vec;
auto test = matrix * vec;
and these are the includes
#include <vulkan/vulkan.h>
#include <SDL2/SDL.h>
#include <glm/vec4.hpp>
#include <glm/mat4x4.hpp>
#include <iostream>
the compiler command line is:
g++ -c -pipe -std=c++11 -g -std=gnu++11 -Wall -W -fPIC -DQT_QML_DEBUG -I../SDLProject -I. -isystem /usr/local/include -I../VulkanSDK/1.0.54.0/x86_64/include -isystem /usr/include -I/usr/lib/qt/mkspecs/linux-g++ -o main.o ../SDLProject/main.cpp
Upvotes: 0
Views: 1933
Reputation: 41
I solved my own question. I realized that I had set an
INCLUDE_PATH+= /usr/include
That mistake is what caused #include_next to be unable to find the next include. After removing that from my .pro file, it compiled without a hiccup.
Upvotes: 1