W
W
Wiki-fan2015-08-07 15:37:37
OpenGL
Wiki-fan, 2015-08-07 15:37:37

Error LNK2001: Unresolved external symbol when building project with GLFW - how to fix?

1>controls.obj : error LNK2001: неразрешенный внешний символ ""struct GLFWwindow * window" ([email protected]@[email protected]@A)"

glew32.lib;opengl32.lib;glfw3.lib;glu32.lib;
At the same time, I added glfw3.lib to the additional dependencies of the project , it even loads, this can be seen if the linker is verbose.
Visual Studio 2015 Community, Windows 10 x64, I built GLFW for x86, I also build my project as x86.
UPD:
Minimal program that repeats the error:
// Include GLEW
#include <GL/glew.h>

// Include GLFW
#include <GLFW/glfw3.h>

class Foo
{
  GLFWwindow* window;
};

// Include GLM
#include <glm/glm.hpp>
using namespace glm;

int main(void)
{
  return 0;
}

If a
class Foo
{
  GLFWwindow* window;
};

replace with GLFWwindow* window;, no error occurs.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wiki-fan, 2015-08-16
@Wiki-fan

It just got fixed. Weird.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question