POV-Ray : Newsgroups : povray.programming : Broken Arrow : Re: Broken Arrow Server Time: 24 May 2019 01:53:27 GMT
  Re: Broken Arrow  
From: Le Forgeron
Date: 28 Jan 2016 16:41:39
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Le 28/01/2016 15:49, clipka a écrit :
> Are you sure that's what's happening? Because last time I checked,
> there is no problem linking two libraries into one executable even
> if they recursively call each other. And I don't think it can't get
> any more interlocked than that.

If you "link" with shared libraries, usually no problem. (but you get
other kind of problems)

But try doing that with static libraries, and the linker can be a PITA.
Well, some linkers... not all of them.

Recursive calls might be ok ( A::a calls B::b which calls again A::a,
the linker might have kept the A::a name, so all is fine. but in some
situation like A::a calls B::b which calls A::z, very first reference
of it ever, which then calls B::c, also first time,...and so on, it
can badly fails). Notice that such intricacy is usually a sign of a
design problem (easy solution: merge both libraries into a single one) )
.

Some linkers try to be smart, to reduce the size of the final binary,
so getting only the parts they really need from the static libraries.

Some other linkers are less smart: take everything, resolves name and
complains when provided more than once, leaving unresolved names up to
any system dynamic library (then execution will fails to resolve them,
but that's not the linker's problem anymore).


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iJwEAQEIAAYFAlaqRMIACgkQhKAm8mTpkW3uSgP/TpH1axrUc3UXfK+l69bQ+lma
LUgGQ/pfWQkWYCItTcZYa997j0zzN/BEjEYMGSAhnZRM8Kre4sZ187VZDK+ZGPSK
OWVm0UeOc5pzDFH6LoWZp3yaf80mkpKg79TL4RtrE4Kr5Z57kKhi6rpKojBeDcNr
Nidr9RW2jDOK58ntjew=
=iBFV
-----END PGP SIGNATURE-----


Post a reply to this message

Copyright 2003-2008 Persistence of Vision Raytracer Pty. Ltd.