Tried getting GLFW to work so that I can start on my project. I'm currently using code from the GLFW site, nothing has been added to that code. I have the path of the lib file coming from C:\Users\herrigdy\Desktop\Visual Studio 2017\BB\Dependencies\include\GLFW
and I'm using the $(SolutionDir)
macro. That's for the header files.
Then I have glfw3.lib
linked in the additional dependencies. Looking at the code nothing is immediately wrong, but it still comes up with this error.
I've tried shortening the path for the header files and have followed the third party library part of the msdn site.
I have the 32-bit binaries for GLFW and I'm building for x86.
The only thing I haven't tried from this site was that the library may have needed other files, but the video I watched to help me set this up didn't reference any other third party dependencies for GLFW.
They also said that we wouldn't need the glfw3.dll
or glfw3lib.dll
(not entirely sure if those are the exact files off the top of my head).
I've also tried copying the evaluated value from the additional dependencies, but it keeps saying that access to said file was disallowed.
I'm working from my school computer so there may be some sort of block that isn't allowing visual to read those files. I can provide screenshots of code if needed.
Edit: Here's code for reference, should also add that the error list says the error is in line 1 file LINK
#include <iostream>
using namespace std;
#include "GLFW/glfw3.h"
int main(void)
{
GLFWwindow* window;
/* Initialize the library */
if (!glfwInit())
return -1;
/* Create a windowed mode window and its OpenGL context */
window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
if (!window)
{
glfwTerminate();
return -1;
}
/* Make the window's context current */
glfwMakeContextCurrent(window);
/* Loop until the user closes the window */
while (!glfwWindowShouldClose(window))
{
/* Render here */
glClear(GL_COLOR_BUFFER_BIT);
/* Swap front and back buffers */
glfwSwapBuffers(window);
/* Poll for and process events */
glfwPollEvents();
}
glfwTerminate();
return 0;
}