Re: Linking MANY object files together, many times
From: Leon. (noemail_at_noemail.noemail.com)
Date: 01/06/04
- Next message: David Efflandt: "Re: LS120 Drives - Need Help Using / User Notes"
- Previous message: Iain Brown: "wake_up_interruptible() in kernel module development"
- In reply to: Chris Mantoulidis: "Linking MANY object files together, many times"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 6 Jan 2004 10:37:10 +1100
"Chris Mantoulidis" <cmad_x@yahoo.com> wrote in message
news:a8587dd9.0401050951.374af5f@posting.google.com...
> I know there's a really easy way to do this but I can't figure out how
> to do it, since my linux experience is limited.
>
> Let's say that for example I have many object files that I link with
> my programs really frequently (almost every time).
>
> What can I do to prevent me from doing all this?
>
> Here's what I've thought of but I don't know how to implement it
>
> put the names of the object files in some variable (e.g. MYOBJECTS)
> and then do
>
> g++ -o abc abc.o MYOBJECTS
>
> How can I make that work? How can I make that MYOBJECTS variable not
> be deleted every time I reboot?
By using "make" and files call "makefile" (or Makefile) that control make.
You should use make, as it detects the case that a source file has a more
recent modification date/time than the .o file ...Currently if you edit the
source code but forget to modify the .o file, then you might take a while to
notice that you have neglected to produce the .o file from the source
file...
>
> TIA,
> cmad
- Next message: David Efflandt: "Re: LS120 Drives - Need Help Using / User Notes"
- Previous message: Iain Brown: "wake_up_interruptible() in kernel module development"
- In reply to: Chris Mantoulidis: "Linking MANY object files together, many times"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|