7
我想使用Microsoft VC++编译器从C++源代码生成汇编代码。我想在命令行本身执行此操作。不是从IDE。如何在Visual Studio 2010中从C++源代码生成汇编代码
什么是命令/选项?
我想使用Microsoft VC++编译器从C++源代码生成汇编代码。我想在命令行本身执行此操作。不是从IDE。如何在Visual Studio 2010中从C++源代码生成汇编代码
什么是命令/选项?
我相信这是/FA switch的用途。
在http://msdn.microsoft.com/en-us/library/367y26c6.aspx
您可以使用 “/ 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.
您可能还需要'/ C'(编译但而不是链接),如果你真的不需要'.obj'文件,那么你可以使用'/ Fonul'将它重定向到nul(但它仍然会花时间构建它,我认为)。 – Rup 2010-12-21 12:34:10
谢谢。这给了我组装! – Nawaz 2010-12-21 12:50:24