5

I have visual studio 2010 and I want to set up glew.h on it. i do this step but still I have linker error: 1.download glew pack

2.copy .h files to C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include

3.copy .lib files to C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib

4.copy glew32.dll to C:\Windows\SysWOW64

5.and finally go to myproject properties then go to linker->input add glew32.lib, glu32.lib, and opengl32.lib to Additional Dependencies

but I still have this error:

error LNK2001: unresolved external symbol __imp____glewBlendEquation

Cœur
  • 37,241
  • 25
  • 195
  • 267
pooya
  • 901
  • 2
  • 15
  • 29

2 Answers2

3

I've been confronted to the same issue today, so even if I'm one month late for the answer, just add GLEW_STATIC to your preprocessor's definitions.

Calvin1602
  • 9,413
  • 2
  • 44
  • 55
  • My errors had been solved but when i run my program, it have runtime error! i use your solution but my errors return back again!! thank you. – pooya Aug 22 '10 at 06:22
  • I use glewInit at first line of main . glewInit returned an error and program finished. – pooya Aug 30 '10 at 06:07
  • 2
    The openGL context must be created before glewInit is called. First open you window with any utility library (GLFW, SDL, whatever) and then call glewInit. – Calvin1602 Aug 30 '10 at 08:24
2

That's a common problem. Just download the source, recompile it and it will work.

Calvin1602
  • 9,413
  • 2
  • 44
  • 55