Re: usage of --start-group and --end-group

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

 



On 17 May 2018 at 08:48, tong chen wrote:
> yeah, It works if places -lintl -lz to the end of the cmd.
> I think It will work with --start-group/--end-group, but It doesn't  .

I think the group will cause the linker to loop over those libraries
in the group, but only at the specified position in the argument list.

If there are no unresolved references at that point, the linker will
stop looping over the group and continue to other arguments. After
processing the other arguments there are more unresolved references,
but it's too late for libint and libz to help, because they've already
been processed.

You always need to list libraries *after* anything that depends on them.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux