LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   gcc-giving error as as: unrecognized option `-Qy' (https://www.linuxquestions.org/questions/linux-newbie-8/gcc-giving-error-as-as-unrecognized-option-%60-qy-630180/)

nidhimittal 03-24-2008 03:40 AM

gcc-giving error as as: unrecognized option `-Qy'
 
Hi
i am compiling .c file on my linux machine


[nidhi@nidhi cprog]$ gcc -c try.c
as: unrecognized option `-Qy'

the scene is as above

i don know i have not even given this Qy option why gcc is producing
this error
pl clarify
Thanks
Nidhi

bigrigdriver 03-24-2008 05:39 AM

Your command to compile is not complete. It is missing the name of the output file.
Code:

gcc -c try.c -o try
Try that. Does the error occur again?

jschiwal 03-24-2008 05:58 AM

The -c option doesn't run the link phase so -o try wouldn't be used.

Which distro do you use? Maybe you need to validate your gcc package.
What does "file $(which gcc)" say? Usually it will be something like /usr/bin/gcc-<version>. I'm wondering if you have a wrapper instead.

Also look at your aliases.

phamductri 03-26-2008 02:23 AM

I got the same problem, I run Ubuntu 7.10, file $(which gcc) tells me that the gcc is 4.1. I tried to reinstall the gcc from CD, still the same error. What has gone wrong? Does anyone know ? Thanks in advance.

nidhimittal 03-27-2008 05:44 AM

i have solved it
 
Quote:

Originally Posted by phamductri (Post 3100705)
I got the same problem, I run Ubuntu 7.10, file $(which gcc) tells me that the gcc is 4.1. I tried to reinstall the gcc from CD, still the same error. What has gone wrong? Does anyone know ? Thanks in advance.

actually in my case my assembler was overwritten with some other assembler
so i got assembler error
its not gcc error
so check using command
$ which as
$which gcc
OR
$as -v OR $as -version
$gcc -v or gcc -version
then see if they match or not
in my case they didnt match so my prob got solved by using right assembler
Nidhi


All times are GMT -5. The time now is 12:54 AM.