简体   繁体   English

未解析的外部符号 x86 程序集

[英]Unresolved External Symbol x86 Assembly

.386
.model flat,stdcall
.stack 4096
ExitProcess proto,dwExitCode:dword
DumpRegs PROTO

.code
main proc
     mov cx, 01h
     sub cx, 2
     call DumpRegs
     add cx, 2 ; Clears the sign flag
     invoke ExitProcess,0
main endp
end main

Errors:错误:

1>Example.obj : warning LNK4258: directive '/ENTRY:main@0' not compatible with switch '/ENTRY:main'; ignored
1>Example.obj : error LNK2019: unresolved external symbol _DumpRegs@0 referenced in function _main@0
1>C:...: fatal error LNK1120: 1 unresolved externals

I tried looking up how to resolve this issue but have had no luck.我尝试查找如何解决此问题,但没有运气。 Can anyone help me get this thing running?谁能帮我把这个东西运行起来?

SOLUTION: For those using Kip Irvine's book and trying to get their stuff to work, you can find how to create a project from scratch using the libraries in his book here (bottom): http://kipirvine.com/asm/gettingStartedVS2013/index.htm解决方案:对于那些使用 Kip Irvine 的书并试图让他们的东西工作的人,您可以在此处(底部)找到如何使用他书中的库从头开始创建项目: http : //kipirvine.com/asm/gettingStartedVS2013/索引.htm

Note that it is below his first two entrys on how to create a program which makes it somewhat difficult to find.请注意,它在他关于如何创建程序的前两个条目下方,这使得它有点难以找到。

您需要使用 INCLUDE 和 INCLUDELIB 包含具有 dumpregs 进程的库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM