VS2022 NASM 安装&使用
安装
进入页面:VSNASM
进入 Release 页面下载最新安装包
解压
VSNASM.zip
管理员启动
install_script.bat
打开以下路径:
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations
提示
具体路径为安装VS2022时所设置的路径
将以下文件复制至上述路径内:
nasm.xml
nasm.targets
nasm.props
打开VS2022,在需要使用的解决方案的项目中,右键,选择:
生成依赖项
==> 生成自定义
勾选
nasm(.target, .props)
并点击确定打开以下路径:
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v160
前往 NASM 官网下载最新版本
将
nasm.exe
解压至上述路径下
使用
找到需要进行编译的
.asm
文件,右键点击属性将
配置属性
==>常规
==>项类型
调整为自定义生成工具
点击应用
进入
配置属性
==>自定义生成工具
==>常规
将
命令行
设定为:<route to nasm.exe> -f win64 <route to asm file> -o <asm file name>.asm.obj
将
输出
设定为:<asm file name>.asm.obj
点击确定即可