[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automatic linker dependencies for helper-libs to solve undefined ref
From: |
Christian Nolte |
Subject: |
Re: automatic linker dependencies for helper-libs to solve undefined references? |
Date: |
Wed, 16 Nov 2005 22:49:38 +0100 |
User-agent: |
Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ralf Wildenhues wrote:
> You have several choices to attack your problem:
>
> First, a question: you get undefined references for linking; is that
> because the libs you create depend on each other mutually (A -> B -> A)?
That is exactly the problem!
> If yes, then you can either
> - list some of them twice in the link line (*_LDADD) (ugly), or,
> - reduce the number of convenience libraries, or even do away with them
> at all.
I understand that reducing the convenience libs can only be achieved
through going the "Recursive make..." way, as you've described? Or is
there another option (just to be sure, you know)?
> Listing everything twice is very ugly but gets that
> usually done. But I'd recommend against it.
I fully agree that this is ugly! As I have tried that too...
> If on the other hand you get undefined references because some library
> is not _built_ at the time it is needed, you can
> - change the order 'make' traverses the subdirectories by ordering the
> entries in SUBDIRS; note that you can use the dot '.' explicitly to
> choose when to build in the current directory.
> - or use (partially) non-recursive Makefiles.
It seems not to be the case that some libs are not built when they are
needed, as I use kdevelop do do the dirty work. Sadly this IDE is not
very flexible/reliable in case of automake-driven projects. So it seems
that I have to tune the Makefile.am's manually. Which is good on the
other hand, as I have much new things to learn ;-)
>>I thought if the approach mentioned in the paper "Recursive make
>>considered harmful" [1] might be a possible solution, which is also to
>>be found in the automake manual as an alternative to subdirectories [2].
>
>
> Definitely. If you want to go that way:
> - be sure to use a _recent_ Automake
> - use the subdir-objects Automake option
Then I will try this way first.
> I hope this helps a bit.
Thank you very much for your help! I think now I get the whole thing
together.
Best regards!
Christian
- --
Christian Nolte
mailto:address@hidden or mailto:address@hidden
key : http://public.fh-wolfenbuettel.de/~noltec/christian-nolte.asc
or : www.keyserver.net
GPG-fingerprint:
1088 6C2D 1496 0A34 D159 1108 08D8 C0D2 77E1 5BBC
- ----------------------------------------------------------------------
The Information Revolution will be fought on the command line.
- ----------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFDe6lxCNjA0nfhW7wRAi4qAJ9wjKZK1Lk1C6ohB1vOYEIxRgEsDwCeLAnd
s5srjzNKmlUc8RmDRpkb8yY=
=y4XC
-----END PGP SIGNATURE-----