MASM StrCmp Undefined?

Posted by Yvan JANSSENS on Stack Overflow See other posts from Stack Overflow or by Yvan JANSSENS
Published on 2010-03-30T19:02:53Z Indexed on 2010/04/05 12:03 UTC
Read the original article Hit count: 733

Filed under:
|
|

Hi,

If I try to assemble the following code, I get a A2006 error ( error A2006: undefined symbol : StrCmp).

Here's my code:

.386
.model flat,stdcall
option casemap:none

include     \masm32\include\windows.inc
include     \masm32\include\kernel32.inc
include     \masm32\include\masm32.inc
include  \masm32\include\user32.inc

includelib  \masm32\lib\kernel32.lib
includelib  \masm32\lib\masm32.lib
includelib  \masm32\lib\stdlib.lib
includelib \masm32\lib\user32.lib

.data
YvanSoftware db "(c) YvanSoftware - ALL RIGHTS RESERVED", 13 ,10 ,0
EnterYourName db "Please enter your name: ", 0
CRLF db 13,10,0
TheHolyMan db "Yvan", 0
Seriously db "Seriously? You're the MAN!", 13,10,0
LoserName db "What a loser name.", 13,10

.data?
buffer db 100 dup(?)
.code
start:
 invoke StdOut,addr YvanSoftware
 invoke StdOut, addr EnterYourName
 invoke StdIn, addr buffer, 100
 invoke StdOut, addr CRLF

 invoke StrCmp,addr buffer, addr TheHolyMan ;error fires here
 je HolyMan
IfNotHolyMan: 
 invoke StdOut, addr LoserName
 jmp EndIfHolyMan
HolyMan:
 invoke StdOut, addr Seriously
 jmp EndIfHolyMan
EndIfHolyMan:

 invoke ExitProcess,0
END start

I'm a complete n00b at assembler, and I'm trying to learn it. ;)

Yvan

© Stack Overflow or respective owner

Related posts about masm

Related posts about string