News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

inkey generaes lnk2001

Started by mhmooney, July 13, 2020, 03:57:57 AM

Previous topic - Next topic

mhmooney

Im trying to use the inkey macro and  I get this error, getkey does the same
Ive include \masm32\macros\masm.asm

Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

masm32.lib(wait_key.obj) : error LNK2001: unresolved external symbol __imp___getch
masm32.lib(wait_key.obj) : error LNK2001: unresolved external symbol __imp___kbhit
mytest.exe : fatal error LNK1120: 2 unresolved externals
_
Link error
Press any key to continue . . .






jj2007

Use masm32rt.inc to include also the necessary *.lib files:

include \masm32\include\masm32rt.inc
.code
start:
  inkey "all is fine"
  exit
end start

mhmooney

That did the trick, obviously there was a dependency I missed. thanks