public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: Why [cannot specify -o option with -c or -S]
@ 2003-10-27 19:36 HOLTZ, CORBIN L. (JSC-ER) (LM)
  0 siblings, 0 replies; 4+ messages in thread
From: HOLTZ, CORBIN L. (JSC-ER) (LM) @ 2003-10-27 19:36 UTC (permalink / raw)
  To: 'Raghu Ram Murthy', gcc-help

I don't know the reasons, I just remember seeing it a time or two due to
makefile problems.  It might have something to do with specifying multiple
source files in one command (in which case -o "something.o" wouldn't make
sense).  Maybe some real GCC experts can enlighten us both.

-----Original Message-----
From: Raghu Ram Murthy [mailto:me_rams@yahoo.com]
Sent: Monday, October 27, 2003 12:51 PM
To: gcc-help@gcc.gnu.org
Subject: RE: Why [cannot specify -o option with -c or -S]


Thank you. I made some error while compiling. It might
be cause of some macros, but I am not sure but it is
working now. It is accepting both -c and -o options.
But I don't know why that error message is displayed.
Because now it is accepting both -c -o options and
earlier it said both cannot be occured. Could u please
say why?

--- "HOLTZ, CORBIN L. (JSC-ER) (LM)"
<corbin.l.holtz1@jsc.nasa.gov> wrote:
> Look very carefully at the actual compile line ("gcc
> ....") output during
> compilation (or repost it for everyone to look at). 
> I have seen this many
> times, and it's always an error in the makefile. 
> Either the source files
> aren't being put into the compile line or something
> else like that.  Make
> sure to check for typos in your macros/rules.
> 
> -----Original Message-----
> From: Raghu Ram Murthy [mailto:me_rams@yahoo.com]
> Sent: Monday, October 27, 2003 12:24 PM
> To: gcc-help@gcc.gnu.org
> Subject: Why [cannot specify -o option with -c or
> -S]
> 
> 
> Hello all,
> Why we can't specify -o option with -c or -S option.
> I
> saw in some Makefiles those are generated by
> configure
> script, containing both options. And while I am
> running make it is giving this error.
> 
> Please help mw how to rectify the error without
> changing Makefile, because there are more than 100
> makefiles. I am ready to change the configure
> script. 
> Please specify where to change.
> 
> Regards
> 
> 
> =====
> -----------------------------------------
> P.Raghu Ram Murthy, M-tech (Computer Science),
> Room No - 245,
> Brahmaputra Hostel,
> Indian Institute of Technology Madras,
> Chennai - 36.
> ------------------------------------------ 
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com


=====
-----------------------------------------
P.Raghu Ram Murthy, M-tech (Computer Science),
Room No - 245,
Brahmaputra Hostel,
Indian Institute of Technology Madras,
Chennai - 36.

Mobile:    (0) 98402 81944
------------------------------------------ 




__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Why [cannot specify -o option with -c or -S]
@ 2003-10-27 20:23 lrtaylor
  0 siblings, 0 replies; 4+ messages in thread
From: lrtaylor @ 2003-10-27 20:23 UTC (permalink / raw)
  To: me_rams, gcc-help

Most of the time that I've seen this error, it was because of a macro
that had quotes in it that wasn't specified properly on the command line
(or, rather, in the Makefile).  For example, I've seen stuff like this
in Makefiles:

-DMYMACRO=\"my macro text\"

The intention is to replace MYMACRO with the string '"my macro text"'.
But what will happen with that is that the shell will interpret that as
three separate arguments to GCC ('-DMYMACRO=\"my', 'macro' and
'text\"'), and GCC will think that 'macro' and 'text\"' are separate
options to the compiler and get confused.  Depending on the text, you
could easily confuse it to the point that you get the error you've seen.
For example, it may be thinking that 'macro' and 'text\"' are source
files to be compiled, in which case, it would be invalid to mix -c and
-o, because it would be invalid to specify a single output file for more
than one source file.  The solution in a case like this is to fix the
macro:

-DMYMACRO="\"my macro text\""

I don't know that that's what your problem is here, but it's something
to look at, when you're searching for the culprit.  An easy way to tell
would be to simply paste the actual command line being executed to the
list.  We could then look at it and tell you what's wrong with it.  You
can then trace that back to the appropriate thing to fix in the
Makefile.

Cheers,
Lyle

-----Original Message-----
From: Raghu Ram Murthy [mailto:me_rams@yahoo.com] 
Sent: Monday, October 27, 2003 11:24 AM
To: gcc-help@gcc.gnu.org
Subject: Why [cannot specify -o option with -c or -S]

Hello all,
Why we can't specify -o option with -c or -S option. I
saw in some Makefiles those are generated by configure
script, containing both options. And while I am
running make it is giving this error.

Please help mw how to rectify the error without
changing Makefile, because there are more than 100
makefiles. I am ready to change the configure script. 
Please specify where to change.

Regards


=====
-----------------------------------------
P.Raghu Ram Murthy, M-tech (Computer Science),
Room No - 245,
Brahmaputra Hostel,
Indian Institute of Technology Madras,
Chennai - 36.
------------------------------------------ 




__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Why [cannot specify -o option with -c or -S]
       [not found] <A850C6B3EB02F044907B475259FFF565017246EA@jsc-mail08.jsc.nasa.gov>
@ 2003-10-27 18:51 ` Raghu Ram Murthy
  0 siblings, 0 replies; 4+ messages in thread
From: Raghu Ram Murthy @ 2003-10-27 18:51 UTC (permalink / raw)
  To: gcc-help

Thank you. I made some error while compiling. It might
be cause of some macros, but I am not sure but it is
working now. It is accepting both -c and -o options.
But I don't know why that error message is displayed.
Because now it is accepting both -c -o options and
earlier it said both cannot be occured. Could u please
say why?

--- "HOLTZ, CORBIN L. (JSC-ER) (LM)"
<corbin.l.holtz1@jsc.nasa.gov> wrote:
> Look very carefully at the actual compile line ("gcc
> ....") output during
> compilation (or repost it for everyone to look at). 
> I have seen this many
> times, and it's always an error in the makefile. 
> Either the source files
> aren't being put into the compile line or something
> else like that.  Make
> sure to check for typos in your macros/rules.
> 
> -----Original Message-----
> From: Raghu Ram Murthy [mailto:me_rams@yahoo.com]
> Sent: Monday, October 27, 2003 12:24 PM
> To: gcc-help@gcc.gnu.org
> Subject: Why [cannot specify -o option with -c or
> -S]
> 
> 
> Hello all,
> Why we can't specify -o option with -c or -S option.
> I
> saw in some Makefiles those are generated by
> configure
> script, containing both options. And while I am
> running make it is giving this error.
> 
> Please help mw how to rectify the error without
> changing Makefile, because there are more than 100
> makefiles. I am ready to change the configure
> script. 
> Please specify where to change.
> 
> Regards
> 
> 
> =====
> -----------------------------------------
> P.Raghu Ram Murthy, M-tech (Computer Science),
> Room No - 245,
> Brahmaputra Hostel,
> Indian Institute of Technology Madras,
> Chennai - 36.
> ------------------------------------------ 
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com


=====
-----------------------------------------
P.Raghu Ram Murthy, M-tech (Computer Science),
Room No - 245,
Brahmaputra Hostel,
Indian Institute of Technology Madras,
Chennai - 36.

Mobile:    (0) 98402 81944
------------------------------------------ 




__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Why [cannot specify -o option with -c or -S]
       [not found] <1067278769.28583.ezmlm@gcc.gnu.org>
@ 2003-10-27 18:24 ` Raghu Ram Murthy
  0 siblings, 0 replies; 4+ messages in thread
From: Raghu Ram Murthy @ 2003-10-27 18:24 UTC (permalink / raw)
  To: gcc-help

Hello all,
Why we can't specify -o option with -c or -S option. I
saw in some Makefiles those are generated by configure
script, containing both options. And while I am
running make it is giving this error.

Please help mw how to rectify the error without
changing Makefile, because there are more than 100
makefiles. I am ready to change the configure script. 
Please specify where to change.

Regards


=====
-----------------------------------------
P.Raghu Ram Murthy, M-tech (Computer Science),
Room No - 245,
Brahmaputra Hostel,
Indian Institute of Technology Madras,
Chennai - 36.
------------------------------------------ 




__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-10-27 20:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-27 19:36 Why [cannot specify -o option with -c or -S] HOLTZ, CORBIN L. (JSC-ER) (LM)
  -- strict thread matches above, loose matches on Subject: below --
2003-10-27 20:23 lrtaylor
     [not found] <A850C6B3EB02F044907B475259FFF565017246EA@jsc-mail08.jsc.nasa.gov>
2003-10-27 18:51 ` Raghu Ram Murthy
     [not found] <1067278769.28583.ezmlm@gcc.gnu.org>
2003-10-27 18:24 ` Raghu Ram Murthy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).