Visual C++汇编链接库的麻烦
我在 VC++ Express 2008 中构建项目时遇到问题... 我正在使用一个库,irvine32.inc/lib。包括 Irvine32.inc 默认在学校为我工作(在已经配置的 VS 环境中),但在家里(Windows 7 x64)我遇到了很多问题。 我原来的帖子是 irvine32.inc 在同一文件夹中引用的文件“无法打开”。将 irvine 文件夹添加到特定项目进度的包含路径中。 然后我遇到了 mt.exe 错误,但是 MSDN 上的建议建议关闭防病毒软件,现在项目确实构建了,但是当我运行一个没有引用 irvine32 中任何内容的程序时,它反复告诉我我的项目已触发一个断点,允许我继续或中断。继续只是弹出同一个窗口,中断加载另一个弹出窗口,告诉我“没有为任何调用堆栈帧加载任何符号。无法显示源代码。”这个弹出窗口让我可以查看反汇编结果。
我在使用和不使用工作语句的情况下测试了它,它只是在第一行代码上抛出相同的断点。现在,如果我在程序确实需要包含文件中的某些内容时运行该程序,在这种情况下, DumpRegs:
INCLUDE Irvine32.inc
.data
.code
main PROC
mov ebx,1000h
mov eax,1000h
add eax,ebx
call DumpRegs
main ENDP
END main
这给了我
1>main.obj : 错误 LNK2019: 函数 _main@0 中引用的无法解析的外部符号 _DumpRegs@0 1>C:\Users\Cameron\csis165\Lab8_CCarroll\Debug\Lab8_CCarroll.exe : fatal error LNK1120: 1 unresolved externals
当我从书中作者的示例构建项目时,不会发生这种情况,该示例具有相同的 include 语句。
我很困惑。 :(
I'm having a problem having my projects built in VC++ Express 2008...
I'm using a library, irvine32.inc/lib. INCLUDE Irvine32.inc works for me at school (On already configured VS environments) by default, but at home (Windows 7 x64) I'm having a boatload of issues.
My original post here was that a file that irvine32.inc referenced, in the same folder, 'could not be opened.' Added irvine folder to the include path for specific project, progress.
Then I was getting an error with mt.exe, but a suggestion on the MSDN suggested turn off antivirus, and now project does build but when I run a program that does NOT reference anything in irvine32, it tells me repeatedly that my project has triggered a breakpoint, and allows me to continue or break. Continue just pops the same window, break loads another popup telling me that "No symbols are loaded for any call stack frame. Source code cannot be displayed." This popup lets me view the disassembly.
I tested it with and without working statements, it just throws the same breakpoint on the first line of code. Now, if I run the program when it DOES require something from the include file, in this case, DumpRegs:
INCLUDE Irvine32.inc
.data
.code
main PROC
mov ebx,1000h
mov eax,1000h
add eax,ebx
call DumpRegs
main ENDP
END main
This gives me
1>main.obj : error LNK2019: unresolved external symbol _DumpRegs@0 referenced in function _main@0
1>C:\Users\Cameron\csis165\Lab8_CCarroll\Debug\Lab8_CCarroll.exe : fatal error LNK1120: 1 unresolved externals
This does NOT happen when I build a project from the book author's examples, which has the same include statement.
I'm baffled. :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我猜项目模板错误。 _DumpRegs@0 显然是 C++,而不是 C 或汇编语言。我的汇编语言讲师的第一堂课是关于设置 make 文件。您使用的是 makefile 项目吗?
Wrong project template I guess. _DumpRegs@0 is clearly C++, not C or assembly language. My assembly language instructor's first class was about setting up the make file. Are you using a makefile project?