Article View: alt.os.linux.ubuntu
Article #124Re: where to put custom headers
From: frank
Date: Wed, 27 Jan 2010 07:48
Date: Wed, 27 Jan 2010 07:48
39 lines
2226 bytes
2226 bytes
Keith Thompson wrote: > frank <frank@example.invalid> writes: > [...] >> Given this intention, would you say this is an appropriate compile >> command line: >> >> dan@dan-desktop:~/source$ gcc -D_GNU_SOURCE -Wall -Wextra rd3.c -o out >> >> ? I'm not sure where I picked up -Wall and -Wextra. Are they both >> still useful? > > I'm not going to comment on the -D_GNU_SOURCE portion of this (due to > a lack of expertise), but I will say something about the "-o". > > When compiling and linking a source file "foo.c" to create an > executable, the convention is to call the executable "foo": > > gcc ... foo.c -o foo > > (It might be something like "foo.exe" on non-Unix-like systems.) > > When compiling a source file "foo.c" to create an object file without > linking, the convention is to call the object file "foo.o": > > gcc -c ... foo.c -o foo.o > > or just: > > gcc -c ... foo.c > > since "foo.o" is the default output name. > > You are of course free to call your output files whatever you like, > but I suggest following these conventions unless you have a good > reason not to. > Added to my linuxlog. --
Technical Details
Message-ID:
<7sa9dvFnllU1@mid.individual.net>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<7ror8bFjn6U1@mid.individual.net> <4b578c9a$0$18138$a9266ab1@news.buzzardnews.com> <7rshd7Fa3vU1@mid.individual.net> <hjbk9j$s2d$1@speranza.aioe.org> <7s9u9uF6kkU1@mid.individual.net> <lny6jkw32k.fsf@nuthaus.mib.org>Show Full Headers
Complete Article Headers
X-Google-Thread: 1200bcf240,4af9266eb6a90621 X-Google-Attributes: gid1200bcf240,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: frank <frank@example.invalid> Newsgroups: alt.os.linux.ubuntu,gnu.gcc.help Subject: Re: where to put custom headers Date: Wed, 27 Jan 2010 00:48:14 -0700 Lines: 39 Message-ID: <7sa9dvFnllU1@mid.individual.net> References: <7ror8bFjn6U1@mid.individual.net> <4b578c9a$0$18138$a9266ab1@news.buzzardnews.com> <7rshd7Fa3vU1@mid.individual.net> <hjbk9j$s2d$1@speranza.aioe.org> <7s9u9uF6kkU1@mid.individual.net> <lny6jkw32k.fsf@nuthaus.mib.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net uB1Ryt9g0crxr2fMmpRmxA4Harf33bSh5mLsHdmOqFzTwARor8 Cancel-Lock: sha1:Q9h53LUKjTHnxLfe2bV6XimqIg4= User-Agent: Thunderbird 2.0.0.23 (X11/20090817) In-Reply-To: <lny6jkw32k.fsf@nuthaus.mib.org>