汇编语言链接错误未解析的外部符号

时间:2016-04-29 23:50:28

标签: assembly masm irvine32

我是汇编的新手,我试图将Irvine32库链接到一个程序,使用SetTextColor输出彩色字符,我正在使用MASM 32

.486                                   ; create 32 bit code
option casemap :none                   ; case sensitive

include \Irvine\Irvine32.inc
include \Irvine\Macros.inc
includelib \Irvine\kernel32.lib
includelib \Irvine\Irvine32.lib

ExitProcess Proto, dwExitCode:DWORD
.code                       ; Tell MASM where the code starts
start:

mov al,'o'
mov eax,yellow + (blue +16)
call SetTextColor
call WriteChar

INVOKE ExitProcess,0        ;endprocess once complete
end start                       ;Tell MASM where the program ends

当我点击控制台汇编和链接时,我收到此错误消息

Irvine32.lib(Irvine32.obj) : error LNK2001: unresolved external symbol _MessageBoxA@16
cshprog4.exe : fatal error LNK1120: 1 unresolved externals

cshprog4是我的程序的名称。 我该怎么做才能解决这个错误?

1 个答案:

答案 0 :(得分:0)

您不需要很多包含。在Youtube上观看此视频。 https://youtu.be/Gk79EzZ2WiI

相关问题