Problem with gcc and trying to produce assembly file

Reply

Join Date: Dec 2007
Posts: 8
Reputation: BlackIris is an unknown quantity at this point 
Solved Threads: 0
BlackIris BlackIris is offline Offline
Newbie Poster

Problem with gcc and trying to produce assembly file

 
0
  #1
Mar 16th, 2009
Sorry if this is in the wrong section but I wasn't really sure where else.

I'm trying to use gcc and -S option in order to produce assembly file. Now, if I do not use -S, I can compile it fine and run it. But once I do use -S, there are a lot of fatal errors (in building) and exits with status 1.

So how is it possible to compile and run fine but I get an error when I try to get assembly code?
Here is what I used:
  1. gcc -ansi asdf.c -o asdf
above works fine and dandy but
  1. gcc -ansi asdf.c -o -S asdf
gives me error.

Any insight would be deeply appreciated. Thanks.
Han shot first
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 2,031
Reputation: Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of 
Solved Threads: 177
Aia's Avatar
Aia Aia is offline Offline
Postaholic

Re: Problem with gcc and trying to produce assembly file

 
0
  #2
Mar 17th, 2009
The switch -S is in the wrong part of the command.
  1. gcc -S filename.c
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC