I know that when linking to multiple static libraries or object files, the order matters (dependent libraries should be listed before their dependencies). I want to know if, when creating a library file with ar
, this same rule applies and the order within the library matters, or within the same .a
file it doesn't make a difference.
I am packing 200+ object files with a complicated dependency graph, and doing
ar rcs mylib.a objs/*.o
is considerably easier then listing them in the correct order.
I am using gcc
, if it makes a difference.