Answered by:
Compile Assembly generated by cl

Question
-
Hello,
I am trying to generate assembly from a basic C file to and then compile the assembly with cl or masm - neither option is working for me.
Generating assembly is straight forward, this is what I am doing:
C:\Users\anthony.gabrielson\Desktop\MC\working_dir>cl /FA codeTest.c <- this generates codeTest.asm
Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
codeTest.c
Microsoft (R) Incremental Linker Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
/out:codeTest.exe
codeTest.objI am then trying to compile the assembly into an executable.
First, I tried to use CL:
C:\Users\anthony.gabrielson\Desktop\MC\working_dir>cl codeTest.asm
Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl : Command line warning D9024 : unrecognized source file type 'codeTest.asm',
object file assumed
Microsoft (R) Incremental Linker Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
/out:codeTest.exe
codeTest.asm
codeTest.asm : fatal error LNK1107: invalid or corrupt file: cannot read at 0x57
D
When CL failed, ml seemed more appropriate:
C:\Users\anthony.gabrielson\Desktop\MC\working_dir>ml64 codeTest.asm
Microsoft (R) Macro Assembler (x64) Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
Assembling: codeTest.asm
codeTest.asm(62) : error A2006:undefined symbol : FLAT
codeTest.asm(29) : error A2006:undefined symbol : $LN3
codeTest.asm(30) : error A2006:undefined symbol : $LN3I have made no changes to the .asm file generated by cl. Does anyone have any ideas?
Thanks,
Anthony
- Moved by Jack Zhai-MSFTMicrosoft contingent staff Thursday, February 28, 2013 12:04 PM
Tuesday, February 26, 2013 8:28 PM
Answers
-
Hello Anthony.
You can ask your question in the C++ Standards, Extensions, and Interop Forum at http://social.msdn.microsoft.com/Forums/en-US/vclanguage/threads; I can move it there for you if you want.
Bye.
Luigi Bruno
- Proposed as answer by Ed Price - MSFTMicrosoft employee Sunday, March 3, 2013 6:23 AM
- Marked as answer by Zoltán HorváthMVP Monday, March 11, 2013 5:02 PM
Thursday, February 28, 2013 12:21 PM -
I ended up finding the answer a few hours later: http://social.msdn.microsoft.com/Forums/eu/windowssdk/thread/4aad9e70-6bb8-4622-a5d9-a3b07b51fc7f
Turns out MS is in the process of making assembly output for informational purposes only - it was a really disappointing answer.
Thanks,
Anthony
- Proposed as answer by Ed Price - MSFTMicrosoft employee Sunday, March 3, 2013 6:23 AM
- Marked as answer by Zoltán HorváthMVP Monday, March 11, 2013 5:02 PM
Thursday, February 28, 2013 1:40 PM
All replies
-
Hi Anthony,
Based on your description, I’m afraid that it is not the correct forum for this issue, since this forum is to discuss:
Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.
I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum.
Best Regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.Thursday, February 28, 2013 12:04 PM -
Hello Anthony.
You can ask your question in the C++ Standards, Extensions, and Interop Forum at http://social.msdn.microsoft.com/Forums/en-US/vclanguage/threads; I can move it there for you if you want.
Bye.
Luigi Bruno
- Proposed as answer by Ed Price - MSFTMicrosoft employee Sunday, March 3, 2013 6:23 AM
- Marked as answer by Zoltán HorváthMVP Monday, March 11, 2013 5:02 PM
Thursday, February 28, 2013 12:21 PM -
I ended up finding the answer a few hours later: http://social.msdn.microsoft.com/Forums/eu/windowssdk/thread/4aad9e70-6bb8-4622-a5d9-a3b07b51fc7f
Turns out MS is in the process of making assembly output for informational purposes only - it was a really disappointing answer.
Thanks,
Anthony
- Proposed as answer by Ed Price - MSFTMicrosoft employee Sunday, March 3, 2013 6:23 AM
- Marked as answer by Zoltán HorváthMVP Monday, March 11, 2013 5:02 PM
Thursday, February 28, 2013 1:40 PM