Re: Hiding inter-library dependencies.

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


Hey everybody again,

I'm using --allow-shlib-undefined to achieve this. Does anybody knows
what kind of headaches I may face in future when using this!?


2016-08-16 11:14 GMT-03:00 Daniel. <danielhilst@xxxxxxxxx>:
> Hi everybody!
> Suppose that I have 3 shared files,
> and two target machines M1 and M2.
>, and
> is linked against only when compiled
> to M1, but not in M2.
> is aways linked against
> So we have:
> M1: <- <- <- executable.
> M2:          <- <-executable
> I want to hide need while linking libB,
> so that libC has not to pass -lA to linker depending
> on machine. And to
> hide libB and libA while linking to libC, so that
> the user need to pass only -lC. Is that possible?
> For example, linking in M1 would be:
> cc -fPIC -shared -o libA.c
> cc -fPIC -shared -o libB.c -lA
> cc -fPIC -shared -o libC.c -lB (no need to -lA is the point here)
> cc -o executable executable.c -lC (no need to -lB -lA is the point here)
> And for M2 would be:
> cc -fPIC -shared -o libB.c
> cc -fPIC -shared -o -lB
> cc -o executable executable.c -lC
> In both cases (machines) the compilation of executable and libC
> is done by the same command line.
> Cheers,
> --
> "Do or do not. There is no try"
>   Yoda Master

"Do or do not. There is no try"
  Yoda Master
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux