delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/02/16:37:25

Date: Mon, 2 Feb 1998 19:20:26 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Robert Hoehne <robert DOT hoehne AT gmx DOT net>
cc: Chris Van Genderen <chris_van_genderen AT issiusa DOT com>,
DJGPP Mailing list <djgpp AT delorie DOT com>
Subject: Re: RHIDE/DJGPP Linker Issue.
In-Reply-To: <34D4FD11.4E36AA8C@gmx.net>
Message-ID: <Pine.SUN.3.91.980202191701.19322V-100000@is>
MIME-Version: 1.0

On Sun, 1 Feb 1998, Robert Hoehne wrote:

> > On the same subject, if a function in lib_b ever calls a function in
> > lib_a, there will be no way to link the project at all with LD. Am I
> 
> Of course there are ways. As an example commandline:
> 
> gcc -o foo.exe foo.o -l_a -l_b -l_a -l_b ....

There is another way: use the linker options -( and -).  All libraries 
between these two options are scanned repetitevely until all the external 
references are resolved.  This slows down linking but avoids the painful 
process whereby you add -l_a -l_b -l_a ... ad nauseum.

You can read more about this option in the linker docs (type "info ld" 
from the DOS prompt).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019