Page 1 of 2
Help with GCC?
Posted: Mon May 10, 2004 2:11 am
by KieranFoot
When I try to compile c code in gcc it comes up with an error, something like, Unrecognised command '-lang-c'
What does this mean & how can I rectify it?
Re:Help with GCC?
Posted: Mon May 10, 2004 2:43 am
by Candy
KieranFoot wrote:
When I try to compile c code in gcc it comes up with an error, something like, Unrecognised command '-lang-c'
What does this mean & how can I rectify it?
How do you compile? What C code? What version is gcc? How did you get that gcc, and how was it configured?
Re:Help with GCC?
Posted: Mon May 10, 2004 2:53 am
by Pype.Clicker
there's nothing like "-lang-c" in parameters for GCC ... you're probably screwing up the building process or trying to pass parameters targetted at compiler X to compiler Y.
Could you provide a bit more information at *what* you're trying to compile and *what* you're trying to use ?
(e.g. attach your makefile or tell us the command you typed)
Re:Help with GCC?
Posted: Mon May 10, 2004 3:18 am
by KieranFoot
I Typed:-
Gcc -c Myfile.C Myfile.???
Re:Help with GCC?
Posted: Mon May 10, 2004 4:03 am
by Pype.Clicker
now, *that*'s funny
- what does gcc --version returns ?
- does it work better if the file is named "myfile.c" (with a lower-case c as extension) than "myfile.C" ?
- what is the "myfile.???" argument you give after the filename ? You know "-c" flag tells the compiler "i just want you to compile this file into a relocatable, linkable object. Don't worry if there are unresolved dependencies, or missing libraries or whatever"
and once again, what's your dev. environment ? linux ? djgpp ? cygwin ? ...
Re:Help with GCC?
Posted: Mon May 10, 2004 4:21 am
by Solar
OK, let's see. Since you haven't told us anything about the contents of Myfile.C, I'll assume:
When *I* type "Gcc -c Myfile.C Myfile.???", I get "Gcc: Myfile.???: No such file or directory.", so you probably did type something else.
Insufficient Information - Unable to reproduce.
Try again.
READY.
*blinking cursor*
Re:Help with GCC?
Posted: Mon May 10, 2004 5:34 am
by sdfgb
- gcc --help
Usage: gcc [options] file...
Options:
--help Display this information
(Use '-v --help' to display command line options of sub-processes)
<pype>... stuff omitted for compactness ...</pype>
-x <language> Specify the language of the following input files
Permissable languages include: c c++ assembler none
'none' means revert to the default behaviour of
guessing the language based on the file's extension
<pype>... stuff omitted for compactness ...</pype>
- gcc -v --help | & grep -i lang
/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.4/2.95.3/cpp0 -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(bsd) -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) --help help-dummy /usr/tmp/ccCVDdfB.i
-lang-c Assume that the input sources are in C
-lang-c89 Assume that the input is C89; depricated
-lang-c++ Assume that the input sources are in C++
-lang-objc Assume that the input sources are in ObjectiveC
-lang-objc++ Assume that the input sources are in ObjectiveC++
-lang-asm Assume that the input sources are in assembler
-lang-chill Assume that the input sources are in Chill
<pype>... stuff omitted for compactness ...</pype>
-
haven't you learned copy-paste in school ??
Re:Help with GCC?
Posted: Mon May 10, 2004 5:40 am
by BI lazy
@sdfgb: And what is the point of this all? What do you mean, besides intending to provoke.
Re:Help with GCC?
Posted: Mon May 10, 2004 5:50 am
by Solar
For one, he's pointing out that KieranFoot could have gotten online help quite easy.
Second, he's pointing out that there *is* a -lang-c option to GCC.
Third, that still doesn't help since KieranFoot is a
bit vague on what his problem is.
Re:Help with GCC?
Posted: Mon May 10, 2004 5:53 am
by Pype.Clicker
@bilazy: i guess the "code poet" (recognize him ? random-5-letters guest) is trying to say that i'm stupid because there *is* -c-lang option flag in his copy of GCC and that simply using "gcc -v --help" would have told me.
@code poet: i learnt *not* to copy/paste at school, for copy/pasting is the root of evil bugz.
Code: Select all
users/martin> gcc -v
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.3/specs
Configured with: (....)
Thread model: posix
gcc version 3.3 20030226 (prerelease) (SuSE Linux)
users/martin> gcc -c-lang
gcc: unrecognized option `-c-lang'
gcc: no input files
and
Code: Select all
users/martin> /opt/gnu/bin/gcc -v
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs
gcc version 2.95.3 20010315 (SuSE)
users/martin> /opt/gnu/bin/gcc -c-lang
gcc: unrecognized option `-c-lang'
gcc: No input files
So it seems "-lang-<language>" is not *that* widely available ...
@codepoet: would you mind becoming a member, one day, so that we don't have the feeling we talk to a wall but instead to a person ? or maybe you're just a program, in which case you should receive my apologize and upgrade to the latest available version of yourself.
Re:Help with GCC?
Posted: Mon May 10, 2004 6:17 am
by distantvoices
@solar: maybe maybe, He's due respect for holding out the holy grail for old KieranFoot, but mark your third point which amongst three is the one which weighs most.
@pype: Of course a moment of recoginition is present - despite the lack of lyra in his lenghty post. That poet could have expressed this with less words without spoiling database space.
No need for apology. He's of course due to an update, I think. *rofl*
Maybe someone already has invented a brain flasher.
Re:Help with GCC?
Posted: Mon May 10, 2004 6:22 am
by Solar
Erm... Pype? You are aware that the option is "-lang-c", not "-c-lang" as in your posting?
Re:Help with GCC?
Posted: Mon May 10, 2004 6:43 am
by Pype.Clicker
<doh>
My mind is temporarily absent ... /dev/brain is screening your call ... please talk after the beep ...
CTRL+H
</doh>
Well, according to `info gcc`,
(...) If cpp does not recognize the extension, it will treat the file as C; this is the most generic mode.
*Note:* Previous versions of cpp accepted a `-lang' option which
selected both the language and the standards conformance level.
This option has been removed, because it conflicts with the `-l'
option.
So i guess my typo isn't that troublesome
Re:Help with GCC?
Posted: Tue May 11, 2004 1:29 pm
by Dragon88
Solar wrote:
OK, let's see. Since you haven't told us anything about the contents of Myfile.C, I'll assume:
When *I* type "Gcc -c Myfile.C Myfile.???", I get "Gcc: Myfile.???: No such file or directory.", so you probably did type something else.
Insufficient Information - Unable to reproduce.
Try again.
READY.
*blinking cursor*
You're forgetting the -o option. What he wants is for gcc to compile and asseble myfile.C, and spit out myfile.???, but he's forgetting -o.
The correct way of doing that is:
gcc -c myfile.C -o myfile.???
As far as the no -lang-c option, I don't see that specified anyways. It probably stems from an old version of GCC.
Re:Help with GCC?
Posted: Wed May 12, 2004 2:45 am
by Pype.Clicker
in every shell i know, 'myfile.???' is a wildcard name saying "myfile. followed by any three character". I'd say the make/batch file he's using is obsolete.