.obj : fatal error LNK1107: invalid or corrupt file: cannot read at 0x6592

落爺英雄遲暮 提交于 2019-12-04 05:36:25

You are trying to load your object model with a C++ linker (probably you have just added it to the project, and now it tries to be compiled). The linker can process .obj files, but it waits them to be 'object-code' files (which also often have .obj extension), which are just compiled modules (e.g. written in C++ language) ready to be linked into a single executable or DLL.

Neither part of a C++ compiler is able to read graphical object model. You should remove the .obj file from your IDE project. And make sure you have a code that reads the file when the program runs.

If you want the object model to be embedded into your .EXE (so the program would not require the file in its directory), then you can put it into resources and link them with the executable.

I had the same problem and resolved it by excluding the .obj file from the build. In other words:

  1. Right click your .obj file.
  2. Click 'Properties
  3. Set 'Exclude from Build' to 'Yes'
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!