MASM Program Calling C/C++ printf Produces Link Error – Needs Correct includelib?
I’m teaching myself Intel x64 assembler with the assistance of a really good textbook: “The Art of 64-Bit Assembly” by Randall Hyde. I’ve run into a snag trying to call the C/C++ printf function from a MASM program. (I’m running MASM Version 14.39.33523.0 in Visual Studio 2022 (64-bit) Version 17.9.6 on a Windows 10 64-bit platform.) The program assembles successfully, but generates a link error on the CALL PRINTF instruction. Here’s the program: