1 在VS中使用自定义工具配置nasm/yasm
1.1 方法一(参考开源工具)
可参考开源工具,具体做法是:
(1)、下载x264源码
(2)、在windows下使用cmake便可产生vs的解决方案工程
(3)、打开产生的VS工程,右击汇编文件的属性,便可看到自定义工具配置参数
1.1方法二(yasm示例)
摘抄网址:https://blog.csdn.net/SoaringLee_fighting/article/details/84319524
Running Yasm
Version Information:
yasm --version
Command Line Option Help:
yasm --help
Assemble test.asm to Win32 object file test.obj with CodeView 8.0 (VS2005) source debug info:
yasm -f win32 -g cv8 test.asm
Assemble test2.asm to Win64 object file test.obj with CodeView 8.0 source debug info:
yasm -f win64 -g cv8 test2.asm
Assemble test3.asm to AMD64 ELF object file test3.o with DWARF2 debugging information:
yasm -f elf64 -g dwarf2 test3.asm
Alternative to above:
yasm -f elf -m amd64 -g dwarf2 test3.asm
Assemble test4.s (GAS syntax file) to 32-bit x86 ELF object file testo.o with DWARF2 debugging information:
yasm -p gas -f elf32 -g dwarf2 -o testo.o test4.s
yasm -i %(RootDir)%(Directory)\ -f win32 -o $(IntDir)%(Filename).obj %(FullPath)
yasm -i %(RootDir)%(Directory)\ -f win64 -o $(IntDir)%(Filename).obj %(FullPath)
yasm -f maco32 test.asm
yasm -f maco64 test.asm