help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: script to find right order for linking


From: Bernd Strieder
Subject: Re: script to find right order for linking
Date: Wed, 13 Jun 2007 12:49:46 +0200
User-agent: KNode/0.10.4

Hello,

Amit Gupta wrote:

> It occurs to me, there should be some script or program that gives you
> one *working* order of library linking, and error's out if there is
> cyclic dependencies. Would be gald, if you can point me to such tool/
> script.
> 
> Input:> set of n libraries
> output:> one correct linking order for the input set.
> 
> I guess, the script can ignore undefined symbols, if the library set
> is incomplete, as that is a *real* problem.

I think you don't need this, see the --start-group and --end-group
options to ld. In very complicated situations that script, if it
existed, could produce linking orders that might allow faster linking,
though.

g++ .... -Wl,--start-group -labc -lbcd -lcde -Wl,--end-group

Bernd Strieder



reply via email to

[Prev in Thread] Current Thread [Next in Thread]