Plus character ('+') in archive name, can't run ar in MRI mode

jyhgekyfbkjsyebf jyhgekyfbkjsyebf@protonmail.ch
Sat Mar 26 16:12:05 GMT 2022


Hello list,

problem: I need to combine multiple static libraries into one. Internet said that I can use ar MRI script. However, it doesn't work with archives that have a '+' character in their name, for example, script:

CREATE libfull.a
ADDLIB /usr/local/lib/libgrpc.a
ADDLIB /usr/local/lib/libgrpc++.a
SAVE
END

results in:

❯ ar -M < ../link_line
ar: /usr/local/lib/libgrpc: No such file or directory
++%

Looks like it chokes on '+' there. What do you suggest to do?


More information about the Binutils mailing list