For some reason, I have to use some assembly code in my dll library project. My visual studio version is 2019.
I follow the settings as below to build assembly code
Project
->Build customizations
, checkmasm
- In the property of my assembly code file, set
Item Type
toMicrosoft Macro Assembler
Then I build the project and got the following error.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\masm.targets(70,5): error MSB3721: The command "ml64.exe /c /nologo /Zi /Fo"x64\Debug\my_assembly.obj" /W3 /errorReport:prompt /Tamy_assembly.asm" exited with code 1.
But if I go to my project directory and run ml64.exe
with options in error message above, I can successfully build the assembly code.
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\ml64.exe" /c /nologo /Zi /Fo"x64\Debug\my_assembly.obj" /W3 /errorReport:prompt /Tamy_assembly.asm
Assembling: my_assembly.asm
After the manual build of my_assembly.obj
from commandline, the build also succeed in visual studio IDE.
What's wrong with the ml64.exe
invoked from visual studio IDE?