为什么我必须将源 `.asm` 文件的 `Properties > General > Item Type` 设置为 `Microsoft Macro Assembler` ...?

为什么我必须将源 .asm 文件的 Properties > General > Item Type 设置为 microsoft Macro Assembler,即使我已经为项目节点选择了选项 Build dependencies > Build Customization > masm。>

heculestong 回答:为什么我必须将源 `.asm` 文件的 `Properties > General > Item Type` 设置为 `Microsoft Macro Assembler` ...?

这可能取决于您使用的是哪个版本的 Visual Studio,但我记得似乎是一次性选择使用其中一个版本为 .asm 文件自动选择 masm 的选项。在处理了多个版本的 Visual Studio 并遇到某些版本的问题后,我手动设置每个 .asm 文件的属性以使用自定义构建工具(也关闭不参与构建,如 John Kalane 评论的那样),这是有效的对于我拥有的所有版本(VS2005、VS2010、VS2015、VS2019)。

32 位调试版本,发布版本不需要 /Zi:

command line: ml /c /Zi /Fo$(OutDir)\example.obj example.asm
outputs: $(OutDir)\example.obj

64 位调试版本,发布版本不需要 /Zi:

command line: ml64 /c /Zi /Fo$(OutDir)\example.obj example.asm
outputs: $(OutDir)\example.obj
本文链接:https://www.f2er.com/1517.html

大家都在问