I am trying to include Glad (generated from here with the GL3.3 api (having similar include problem with GLFW as well)) as such
#include <glad/glad.h>
I feel like this should work since I have my additional include directories for the file in the project as
vendor\Glad\include
where my VS solution has the file structure of
-solutionName
--projectName
---src
----projectname.h <- Where I am including from for now, latter I want to include from elsewhere under the src directory.
---vendor (same level as src)
----Glad
-----include
------glad
-------glad.h
------KHR
-------khrplatform.h
I have been able to get the include to work by including the file as
#include <../vendor/Glad/include/glad/glad.h>
but when I do this I get an error ("C1083" "Cannot open include file: 'KHR/khrplatform.h':No such file or directory") because an include in glad.h can't find khrplatform.h when it includes like so
#include <KHR/khrplatform.h>
I could change that line in glad.h but I really don't want to have to change a library's code to make mine work.
This also happens with GLFW which has mirroring additional include directories and file paths but with glad replaced with GLFW where applicable.
In addition Visual studio will offer the
<glad/glad.h>
file path as a suggestion when I am typing out the include line in projectName.h but I still get the error "C1083" "Cannot open include file: 'glad/glad.h': No such file or directory".
Another quirk is that I am using spdlog file the additional include directory
vendor\spdlog\include
and am able to include headers in the src directory as such:
#include <spdlog/spdlog.h>
which works and doesn't throw and problems.
The file structure for this is
-solutionName
--projectName
---src
----Utilities
-----Logger.h <- Where I am including from.
---vendor (same level as src)
----spdlog
-----include
------spdlog
-------spdlog.h <- file I am including just fine.
This makes it feel like only some of the additional include directories are actually working and I'm not sure why is this happening or how can I fix it after spending a couple hours playing guess and check. I want to include the libraries like
#include <glad/glad.h>
#include <GLFW/glfw3.h>
How can I make this work?
Thanks for your time, -Michael