获取致命错误LNK1107:文件无效或损坏:无法在0x310读取 [英] Gets fatal error LNK1107: invalid or corrupt file: cannot read at 0x310
问题描述
大家好,
我是MFC的初学者,我试图在另一个基于MFC对话框的应用程序中的MFC中使用dll.
我更改了以下项目属性.
1.项目-> c/C ++->常规->其他包含目录
添加我的dll项目的.h文件路径.
2.链接程序->输入->其他依赖项
给了库名.
3.将.lib和.dll文件复制到项目文件夹
但是仍然出现类似
的错误
致命错误LNK1107:无效或损坏的文件:无法在0x310读取".
我希望有人能帮助我.
在此先感谢.
Hi Everyone,
I am beginner in MFC, I was trying to use a dll in MFC, in another MFC dialog based application.
I have changed the following project properties.
1. Project->c/C++->General->Additional include directories
Add my dll project''s .h file path.
2. Linker->Input->Additional Dependencies
Gave the library name.
3. Copied .lib and .dll files to the project folder
But still I am getting an error like
"fatal error LNK1107: invalid or corrupt file: cannot read at 0x310".
I hope someone could help me.
Thanks in advance.
推荐答案
查看文档 [ ^ ],我怀疑您已将.dll
文件传递给链接器.相反,您应该传递.lib
文件.
Looking at the documentation[^], I suspect you passed the.dll
file to the linker. You should instead pass the.lib
file.
这篇关于获取致命错误LNK1107:文件无效或损坏:无法在0x310读取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!