0

I install GLEW library into the Visual Studio:
x64/bin/glew32.dll to %SystemRoot%/system32
x64/lib/glew32.lib to {VC Root}/Lib
include/GL/glew.h to {VC Root}/Include/GL
include/GL/wglew.h to {VC Root}/Include/GL

And add library in Linker > Input: glew32.lib and write #pragma comment

#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "glu32.lib")
#pragma comment(lib, "glut32.lib")
#pragma comment(lib, "glew32.lib")

#include <iostream>
#include <windows.h>
#include <glew.h>
#include <glut.h>

But Visual Studio continues to write error:

1>Core.obj : error LNK2001: unresolved external symbol __imp____glewBindVertexArray
1>Core.obj : error LNK2001: unresolved external symbol __imp____glewGenVertexArrays
NoName
  • 57
  • 7

1 Answers1

0

You're missing GLEW (The OpenGL Extension Wrangler Library). You can link this in with the following pragma somewhere in your source code:

#pragma comment(lib, "glew32.lib")

Or you can modify the linker flags in the project settings. This assumes that you have the GLEW library installed. On my system, I installed it at the following path:

C:\Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib/glew32.lib

The path may be different on your system, and there are other ways of linking with GLEW if you don't want to install it.

Ali Sajid
  • 3,964
  • 5
  • 18
  • 33