(OS X) Combine .a's into one .dylib

Hey there!

During a build process, I am creating quite some libraries. I now want to combine the various static libraries into one dynamic library…but whatever I tried, I only got an 8KB large file, it disappointed me somewhat. What would be the proper way of doing this?

Kind regards, Ingwie.

Hello Ingwie,

I guess the -all_load option is what you need:
man ld:
-all_load Loads all members of static archive libraries.

Or -force_load if you want to load all the symbols from a specific archive only.

Lucas

Thank you! I tried it, and it was what I was looking for. :slight_smile:
Thanks for the help!

Kind regards,
Ingwie