我想使用Microsoft VC ++编译器从C ++源代码生成汇编代码。我想在命令行中执行此操作。不是来自IDE。
命令/选项是什么?
答案 0 :(得分:9)
我相信这就是/FA switch的用途。
答案 1 :(得分:2)
您可以使用" / FA / Fa"您可以使用的选项..
在那里的文件中,
CL /FAcs HELLO.CPP
/FA Assembly code; .asm
/FAc Machine and assembly code; .cod
/FAs Source and assembly code; .asm
If /FAcs is specified, the file extension will be .cod
/FAu Causes the output file to be created in UTF-8 format,
with a byte order marker.
By default, the file encoding is ANSI,
but use /FAu if you want a listing file that displays correctly on any system,
or if you are using Unicode source code files as input to the compiler.
If /FAsu is specified, and if a source code file uses Unicode encoding other than UTF-8,
then the code lines in the .asm file may not display correctly.