Error Error1 LNK1107: Invalid or corrupt file: cannot read on 0x2B0

I am new to opengl and I have no idea what this error means. I am using Visual Studio 2012> C ++> Empty project. I follow these steps on other computers that work for me, but I do it on my computer. I get this error.

MISTAKE

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

The steps that I perform are:

  • Copy the Glew and Glut folders from the My folder to your desktop.
  • Open Visual Studio, Select New Project
  • Select Visual C ++, select Empty Project
  • Record OpenGLProject as the name of your project.
  • Right-click on your project in the solution explorer and select add → add new item.
  • Select C ++. Cpp, name it HelloOpenGL.
  • Right click on your project, select properties
  • Select the entire configuration from the configuration drop-down list.
  • Go to C / C ++ -> General
  • Go to Include Additional Directories
  • Click the button on the right side and select "Edit", then select the glew / include folder
  • Press the button on the right side and select "Edit", then select the folder "Mute / enable"
  • Click OK
  • Now go to Linker -> Input
  • Go to Additional Dependencies
  • Click "Edit" and "Right" glew32.lib and freeglut.lib.
  • Click OK
  • Now go to the General section
  • Go to Additional Libraries Directories
  • Go to the Glew folder and select lib
  • Go to the freeglut folder and select lib ..

ThankYou.

+7
c ++ visual-studio-2012 opengl
source share
1 answer

The error message assumes that you are attached to glew32.dll instead of glew32.lib . You always need to link the lib file and copy the dll to the place where it can be found at runtime.

+15
source share

All Articles