You're right that it does make the link time longer and is not the
optimal situation, but I don't/didn't always have control (source
code) of the libraries I'm linking. I don't do this anymore since I
mostly create/use only dynamic libraries now. But this technique isn't
totally useless since it does free you from having to determine
dependencies...

On 11/9/06, Jan Ciger <[EMAIL PROTECTED]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

c sklu wrote:
> To prevent this situation, I usually double-link, that is put the list
> of libraries twice:
>
> i.e. -lliba -llibb -lliba -llibb
>

This is useless and only makes the linking time longer because the
linker has to parse twice as many libraries. A better solution is to
make sure that:

a) Modules of your program are cleanly designed (i.e. no situation that
A needs B and B needs A)

b) You order the libraries in the link step in the order of dependency.

Regards,

Jan

- --

Jan Ciger
GPG public key: http://www.keyserver.net/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFFUzfzn11XseNj94gRAibkAJ9i8QbeyZ7S7N+/7t9HDOPQ2Bn3mACfVb9Q
6TLMX1ATvKST1QB0t/XewkA=
=xwRZ
-----END PGP SIGNATURE-----
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to