C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old April 8th, 2003, 04:30 PM
mrquestionman mrquestionman is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 2 mrquestionman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
compiler error problem

with my IDE (quincy 99), i try compiling even a simple script, but it always comes up with this error msg:

gcc.exe: cannot specify -o with -c or -S and multiple compilations

what does that mean, and how can I fix it?

Reply With Quote
  #2  
Old April 8th, 2003, 07:58 PM
dwise1_aol's Avatar
dwise1_aol dwise1_aol is online now
Contributing User
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 3,793 dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Month 6 h 53 m 57 sec
Reputation Power: 434
The -c option compiles the source file and stops -- ie, it does not link the resultant object file into an executable.

The -S option produces an assembly code output and stops -- ie, it does not create an object file nor does it create an executable.

In both these cases, the resultant .o or .s file would by default have the same name as the source file -- eg, gcc -c foo.c would produce a foo.o file. The -o option allows you to rename the output file -- gcc -o bar.s foo.c -S would produce a bar.s file.

Obviously, you can only rename the output file of a single source file. So if you run gcc on multiple source files, you cannot change the output names from the default because there's no way to specify the new name for each and every one of the multiple source files. You'd have the ridiculous situation of trying to give the same name to multiple output files in the same directory.


Thanks for the question. I had never thought of trying to use the -o option with the -c and -S options, nor that it could create problems.


Oh, sorry, I forgot. You fix it by either not using the -o option in those cases, thus allowing the output files to receive their default names, or by only compiling single source files when you do want to change the name of the output files with -o .

Last edited by dwise1_aol : April 8th, 2003 at 08:04 PM.

Reply With Quote
  #3  
Old April 9th, 2003, 02:31 PM
mrquestionman mrquestionman is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 2 mrquestionman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
how exactly would I change it?

Reply With Quote
  #4  
Old April 9th, 2003, 08:42 PM
dwise1_aol's Avatar
dwise1_aol dwise1_aol is online now
Contributing User
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 3,793 dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Month 6 h 53 m 57 sec
Reputation Power: 434
Quote:
Originally posted by mrquestionman
how exactly would I change it?


Well, what are you trying to do?

If you're compiling multiple source files to produce object files or assembly source, then don't use the -o option. Just let the output files default to the source-file names.

If you really want to use the -o option, then compile only one source file at a time.

If it's your IDE that's trying to do this on its own initiative, then check its settings and/or the make file to see what might be causing those options to be set.

Sorry to say, but if the problem is Quincy-specific, you will probably need to find another Quincy user or whoever developed it. But still, check the IDE options and configuration to see if anything I mentioned has been selected.

Last edited by dwise1_aol : April 9th, 2003 at 08:47 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > compiler error problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway