Could someone please tell me, if I were to compile a C++ file from C#, what would the execution string be (assuming I am using x86 cl.exe for compiling). I would like to output the assembler along with original source code (similar to the option in Visual Studio)?
Something like (just example):
” cl.exe my_cpp_file.cpp -assembler -source_code”
and would it be much different for compiling C?
EDIT is this correct? I need to use “FAs”
CL FAs my_cpp_file.cpp
I’m not too sure what to do about? … [lib…] [@command-file] [/link link-opt…]
(http://msdn.microsoft.com/en-us/library/610ecb4h(v=vs.100).aspx)
I would also like to do full-optimization compiling
EDIT2 I dont want to execute the file, all I wish to do is produce the assembler output (with source code)
The
/FAsoption seems to be what you’re looking for. Check out the documentation.