Static Library
Posted: Thu Aug 13, 2026 1:04 am
Hello,
I am working on a custom operating system and I want create static libraries. I am working on a MacBook M4 (silicon).
I am using the compiler x86_64-elf-gcc and linker x86_64-elf-ld. The problem is when I create a static library with command:
ar -r libc.a *.o I get a library. But if I am using command ranlib I get response:
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: archive library: libc.a the table of contents is empty (no object file members in the library define global symbols)
And the library is not working with the linker.
Does anybody know what is wrong?
Kind regards,
Robert
I am working on a custom operating system and I want create static libraries. I am working on a MacBook M4 (silicon).
I am using the compiler x86_64-elf-gcc and linker x86_64-elf-ld. The problem is when I create a static library with command:
ar -r libc.a *.o I get a library. But if I am using command ranlib I get response:
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: archive library: libc.a the table of contents is empty (no object file members in the library define global symbols)
And the library is not working with the linker.
Does anybody know what is wrong?
Kind regards,
Robert