未解决的外部符号和致命错误

时间:2019-06-13 11:55:57

标签: assembly x86 masm irvine32

我遇到的错误:

LoganWileyproj3.obj : error LNK2001: unresolved external symbol _ExitProcess@4
LoganWileyproj3.exe : fatal error LNK1120: 1 unresolved externals

尝试了几件事

; LoganWileyproj3.asm - calculated the expression A = (A+B)-(C+D)
INCLUDE Irvine32.inc

.386
.model flat, stdcall
.stack 4096
ExitProcess proto, dwExitCode: dword
.code
main PROC
    ;assign the integer value to registers
    mov eax,150       ; A=EAX=150
    mov ebx,100        ; B=EBX=100
    mov ecx,50          ; C=ECX=50
    mov edx,40         ; D=EDX=40
    ; calculates the expression
    add eax,ebx         ; EAX= (A+B)
    add ecx,edx         ; ECX= (C+D)
    sub eax,ecx         ; EAX= (A+B) - (C+D)
    invoke ExitProcess,0
main ENDP
END MAIN

0 个答案:

没有答案