Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error1 error LNK1107: invalid or corrupt file: cannot read at 0x2B0

I am new in opengl and i have no idea what this error means. I am using Visual Studio 2012 > C++ > Empty Project. I Follow these steps in other pc thats work for me but i am doing this in my pc i am getting this error.

ERROR

Error 1 error LNK1107: invalid or corrupt file: cannot read at 0x2B0 ?>C:\Users\Uxi\Desktop\Sp16 \Vs\OpenglPrac\OpenglPrac\glew32.dll 1 1 >OpenglPrac

Steps i Follow Is :

  1. Copy the Folder Glew and Glut from My folder to your desktop.
  2. Open Visual Studio , Select New Project
  3. Select Visual C++, Select Empty Project
  4. Write OpenGLProject as the name of your project.
  5. Right click on your project in solution explorer and select add -> add new item.
  6. Select C++ .cpp item , Name it HelloOpenGL.
  7. Right Click on your Project again, select properties
  8. Select all configuration in configuration dropdown list
  9. Go to C/ C++ -> General
  10. Go to Additional Include Directories
  11. Click on the button on right side and select Edit then select glew/include folder
  12. Click on the button on right side and select Edit then select glut/include folder
  13. Press OK
  14. Now Go to Linker - > Input
  15. Go to Additional Dependencies
  16. Click on Edit and Right glew32.lib and freeglut.lib.
  17. Press OK
  18. Now go to General
  19. Go to Additional libraries Directories
  20. Go to the Glew folder and select lib
  21. Go to the freeglut folder and select lib..

ThankYou.

like image 429
Uzair Avatar asked Mar 10 '16 12:03

Uzair


1 Answers

The error message suggests, that you have linked against glew32.dll instead of glew32.lib. One always has to link against the lib file and copy the dll to a place where it can be found at runtime.

like image 171
BDL Avatar answered Sep 19 '22 15:09

BDL