$ cat common.c int common[100]; int other = 42; $ cat main.c extern int common[100]; int main(int argc, char* argv[]) { return common[0]; } $ cc -c common.c $ cc -c main.c $ ar rcs libcommon.a common.o $ cc main.o libcommon.a -Wl,-ld_classic ld: warning: -ld_classic is deprecated and will be removed in a future release Undefined symbols for architecture arm64: "_common", referenced from: _main in main.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)