LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-24-2008, 03:40 AM   #1
nidhimittal
LQ Newbie
 
Registered: Mar 2008
Posts: 2

Rep: Reputation: 0
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
 
Old 03-24-2008, 05:39 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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?
 
Old 03-24-2008, 05:58 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 03-26-2008, 02:23 AM   #4
phamductri
LQ Newbie
 
Registered: Mar 2008
Posts: 1

Rep: Reputation: 0
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.
 
Old 03-27-2008, 05:44 AM   #5
nidhimittal
LQ Newbie
 
Registered: Mar 2008
Posts: 2

Original Poster
Rep: Reputation: 0
i have solved it

Quote:
Originally Posted by phamductri View Post
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
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc unrecognized option ruben22 Linux From Scratch 9 11-12-2008 04:41 AM
Compilation error : cc: unrecognized option `-KPIC' adarshkmr Linux - Newbie 2 02-11-2008 11:00 PM
pkg-get install gcc ERROR: gcc unrecognized Raidmax Solaris / OpenSolaris 10 08-30-2007 12:51 PM
GCC compiler giving syntax error before 'double' error dragonmint Programming 2 06-02-2007 02:07 PM
gcc: unrecognized option `-prefer-non-pic' Noodles25 Linux - Software 3 04-19-2007 07:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration