LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 02-01-2010, 04:02 PM   #1
txjenniek
LQ Newbie
 
Registered: Feb 2010
Posts: 1

Rep: Reputation: 0
Question GCC errors with common flags aka -g, -ansi, -Wall


I have the latest GCC + Build Essentials package installed, and verified that gcc -v does output. Also, I have done essentially the same installation on two computers. On one, gcc works fine. On the other, any flags added to gcc command is producing errors:

Useless example w/ no reported errors: gcc test.c

gcc test.c -g -Wall -o test
-g: No file or directory found
-Wall: No file or directory found
(etc.)

I've tried several things and searched the forums and can't seem to find something specific to this error. Thanks.

PS, I'm sure that my simple hello world program is only C code and compilable since it operates fine on the other machine.
 
Old 02-01-2010, 06:02 PM   #2
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375
Blog Entries: 24

Rep: Reputation: 43
Quote:
Originally Posted by txjenniek View Post
I have the latest GCC + Build Essentials package installed, and verified that gcc -v does output. Also, I have done essentially the same installation on two computers. On one, gcc works fine. On the other, any flags added to gcc command is producing errors:

Useless example w/ no reported errors: gcc test.c

gcc test.c -g -Wall -o test
-g: No file or directory found
-Wall: No file or directory found
(etc.)

I've tried several things and searched the forums and can't seem to find something specific to this error. Thanks.

PS, I'm sure that my simple hello world program is only C code and compilable since it operates fine on the other machine.
That's weird. I always thought it didn't matter whether the options came before or after the infiles. Can you put test.c at the end of the command, and see if that works?

BTW: What kind of system are you on? (Linux distro version?) What version of gcc is it?
 
Old 02-01-2010, 06:30 PM   #3
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by txjenniek View Post
gcc test.c -g -Wall -o test
-g: No file or directory found
-Wall: No file or directory found
What is the output of "ls -al $(which -a gcc)" on the system that reports these errors?
 
  


Reply

Tags
flags, gcc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
configure not finding ansi c compiler even though I have gcc installed lilmike Linux - Newbie 5 11-02-2009 07:18 PM
A little problem with ANSI C and gcc SpLaSh212 Programming 5 12-04-2008 05:12 PM
gcc flags? kalleanka Programming 2 08-16-2007 07:53 AM
GCC Flags matsko Linux - Software 2 05-14-2007 02:23 PM
what ANSI C++ version does gcc 3.2.3 conform to? kmullin Programming 1 05-26-2004 03:32 PM


All times are GMT -5. The time now is 01:43 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration