MASM32致命错误LNK1120:1个未解析的外部

时间:2017-11-24 10:03:17

标签: assembly masm32 sasm

我安装了SimpleASM和MASM32来学习组装。我现在正在读一本书并尝试用它写的代码。

; AddTwo.asm - adds two 32-bit integers
; Chapter 3 example

.386
.model flat,stdcall
.stack 4096
ExitProcess PROTO, dwExitCode: DWORD

.code
main PROC
mov eax, 5     ; move 5 to the eax register
add eax,6     ; add 6 to the eax register

INVOKE    ExitProcess,0
main ENDP
END main

但是当我尝试构建代码时,这就是控制台所说的

[17:56:02] Warning! Errors have occurred in the build:
program.o : error LNK2001: unresolved external symbol _ExitProcess@4
C:\Users\De\AppData\Local\Temp\SASM\SASMprog.exe : fatal error LNK1120: 1 unresolved externals

编辑:

而我提取masm32。在cmd部分,它说

"inc2l.exe - Ordinal Not Found"
"The ordinal 203 could not be located in the dynamic link library
WINSPOOL.DRV." 

我只是忽略它..它一直显示..我只是按下回车直到装配件

0 个答案:

没有答案
相关问题