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.