Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C - C++ Learning > Re: Using the s...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 22 Topic 4074 of 4306
Post > Topic >>

Re: Using the same source file from other source files

by Richard Heathfield <rjh@[EMAIL PROTECTED] > Mar 20, 2008 at 08:36 AM

Hal Vaughan said:

<snip>
> 
> So I create protofunctions in a header and include that instead of the
> actual source file, right?

I can see nothing obviously wrong with Jim Langston's fine reply to this 
bit, so I'll move on to your next question.

> Richard Heathfield wrote:
> 
>> To make the files all work together, you have to "link" them.
>> 
>> In gcc, it works like this:
>> 
>> gcc ...lots of flags and stuff... -c -o foo.o foo.c
>> gcc ...lots of flags and stuff... -c -o bar.o bar.c
>> gcc ...lots of flags and stuff... -c -o baz.o baz.c
> 
> For some reason when I try gcc, I run into problems, so I've been using
> g++. I know it's to the same binary, but for some reason it only works
as
> g++. Are there implications to that which aren't obvious?

Oops - mea culpa. I keep assuming that people are using C, don't I? I tend

to forget that there are still one or two C++ users out there. ;-)

So - no, there are no non-obvious implications that obviously spring to 
mind, but the very *non*-non-obvious implication is that you use g++ if 
you're still struggling along with C++, and upgrade to gcc once you're 
ready to make the leap to C.


> I've installed the C and C++ stuff in Eclipse, but I've been using a
text
> editor and the command line for now, while I'm getting use to it. 

I don't bother with an IDE - I find that the command line is more
powerful, 
for me at least. Of course, I do use a makefile, albeit a rather primitive

one. But it would be silly to be prescriptive about this. In fact, when 
I'm on Windows, I /do/ use an IDE - but that doesn't happen very often 
nowadays.

-- 
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www.
+rjh@[EMAIL PROTECTED]
 users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
 




 22 Posts in Topic:
Using the same source file from other source files
Hal Vaughan <hal@[EMAI  2008-03-20 07:10:47 
Re: Using the same source file from other source files
Richard Heathfield <rj  2008-03-20 07:25:59 
Re: Using the same source file from other source files
Hal Vaughan <hal@[EMAI  2008-03-20 07:29:28 
Re: Using the same source file from other source files
"Jim Langston"   2008-03-20 00:55:37 
Re: Using the same source file from other source files
Philip Potter <pgp@[EM  2008-03-20 15:31:49 
Re: Using the same source file from other source files
Richard Heathfield <rj  2008-03-20 08:36:26 
Re: Using the same source file from other source files
Hal Vaughan <hal@[EMAI  2008-03-20 08:50:25 
Re: Using the same source file from other source files
Hal Vaughan <hal@[EMAI  2008-03-20 09:28:25 
Re: Using the same source file from other source files
Hal Vaughan <hal@[EMAI  2008-03-20 09:37:01 
Re: Using the same source file from other source files
"Chris ( Val )"  2008-03-21 03:37:07 
Re: Using the same source file from other source files
Philip Potter <pgp@[EM  2008-03-25 17:22:35 
Re: Using the same source file from other source files
Ben Bacarisse <ben.use  2008-03-20 15:08:23 
Re: Using the same source file from other source files
Hal Vaughan <hal@[EMAI  2008-03-20 15:37:26 
Re: Using the same source file from other source files
Ben Bacarisse <ben.use  2008-03-20 15:48:02 
Re: Using the same source file from other source files
Hal Vaughan <hal@[EMAI  2008-03-20 15:56:20 
Re: Using the same source file from other source files
Philip Potter <pgp@[EM  2008-03-20 17:11:20 
Re: Using the same source file from other source files
Hal Vaughan <hal@[EMAI  2008-03-20 17:54:57 
Re: Using the same source file from other source files
Philip Potter <pgp@[EM  2008-03-21 10:03:58 
Re: Using the same source file from other source files
Ben Bacarisse <ben.use  2008-03-20 19:34:41 
Re: Using the same source file from other source files
Hal Vaughan <hal@[EMAI  2008-03-20 20:31:21 
Re: Using the same source file from other source files
Ben Bacarisse <ben.use  2008-03-20 19:45:49 
Re: Using the same source file from other source files
Hal Vaughan <hal@[EMAI  2008-03-20 20:34:08 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 12:27:55 CDT 2008.