.obj:致命错误LNK1107:无效或损坏的文件:无法在0x6592读取 [英] .obj : fatal error LNK1107: invalid or corrupt file: cannot read at 0x6592

查看:4314
本文介绍了.obj:致命错误LNK1107:无效或损坏的文件:无法在0x6592读取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图加载一个.obj模型到我的c ++ opengl 3代码,但由于某种原因,它给我这个错误:

I am trying to load an .obj model into my c++ opengl 3 code but for some reason it gives me this error :

1>链接...
1> .\bunny.obj:致命错误LNK1107:无效或损坏的文件:无法读取0x6592

1>Linking... 1>.\bunny.obj : fatal error LNK1107: invalid or corrupt file: cannot read at 0x6592

我试图搜索类似的错误,是关于.dll或.lib的。

I tried to search for similar errors, but there were about .dll's or .lib's.

你能帮我解决这个问题。我也尝试过不同的obj模型,但它总是给我这个错误。

Can you please help me out with this issue. I have also tried with different obj models but it always gives me this error.

推荐答案

一个C ++链接器(可能你刚刚将它添加到项目,现在它试图编译)。
链接器可以处理.obj文件,但它会等待它们成为对象代码文件(它们通常也有.obj扩展名),这些文件只是已编译的模块(例如用C ++语言编写)变成单个可执行文件或DLL。

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.

C ++编译器的任何一部分都不能读取图形对象模型。您应该从IDE项目中删除.obj文件。并确保你有一个代码,在程序运行时读取文件。

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.

如果你想将对象模型嵌入到你的.EXE中(所以程序不会需要其目录中的文件),那么您可以将其放入资源并将其链接到可执行文件。

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.

这篇关于.obj:致命错误LNK1107:无效或损坏的文件:无法在0x6592读取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆