[Top][All Lists]

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

how to use circular dependencies

From: tom fogal
Subject: how to use circular dependencies
Date: Fri, 08 Jul 2005 14:14:51 -0400

Hi all, I'm trying to get libtool to link a program that depends on a
circular list of static (libtool) libraries.

I'm using a command line like:

../../libtool --mode=link --preserve-dup-deps g77 -Wall -I../include
-O0 -o partrj -static *.o ../ui/ ../models/
../share/ ../models/ ../grid/
../fields/ ../share/
../menus/ ../strings/src/
../hash/ ../dbg/ ../t89files/

unfortunately this ends up not working because libtool is
removing/reordering some of the libraries:

g77 -Wall -I../include -O0 -o partrj <bunch of .o files>
../ui/.libs/libParTrjUI.a ../models/.libs/libSPPModels.a
../grid/.libs/libSPPgrid.a ../fields/.libs/libSPPFields.a
../share/.libs/libSPPShare.a ../menus/.libs/libParTrjMenu.a
../strings/src/.libs/libSPPStrings.a ../hash/.libs/libHash.a
../dbg/.libs/libSPPdbg.a ../t89files/.libs/libSPPt89.a

"--preserve-dup-deps" doesn't seem to have an effect. I also tried
remaking the command line using -L and -l options instead of explicitly
specifying the .la file, with the same effect of libtool stripping out
libraries from the link line.

I found a post on libtool-patches from 2002, where someone else had run
into this issue. They expected linker flags of -Wl,"-(" <libs> -Wl,"-)"
to fix it. I changed my link line above to use these linker flags in
the libtool command line, but I still get the same error. It appears as
if the patch was never applied (why?)?

I am using libtool version '1.5.18 (1.1220.2.246 2005/05/16 10:00:18'.

What am I doing wrong? How can one link in circular dependencies using



reply via email to

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