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