I am running into a persistant issue where everytime I call a function from the glad.h file, I get an unresolved external error (LNK2019 in VS 2017).
Here is the code:
#ifndef MAIN
#define MAIN
#include "Dependencies\glad\glad.h"
#include "Dependencies\glfw\glfw3.h"
int main(void){
GLFWwindow* window;
if (!glfwInit())
return -1;
window = glfwCreateWindow(640, 480, "Test", NULL, NULL);
if (!window)
{
glfwTerminate();
return -1;
}
glfwMakeContextCurrent(window);
gladLoadGLLoader((GLADloadproc) glfwGetProcAddress);
glfwDestroyWindow(window);
glfwTerminate();
return 0;
}
#endif
FYI the khrplatform.h is properly included within glad.h
Linker Settings:
For those having the problem : The solution is to include the .c file for GLAD or GLFW