Recommended approach to generate the Exported Symbols List file

Assuming I have a static library where all global symbols need to be re-exported by the target executable. How do I extract these symbols into a file to be used with ld's -exported_symbols_list and Xcode's EXPORTED_SYMBOLS_FILE?

I was thinking about nm -gUjo … + sed but maybe there is abetter way?

Replies

Assuming I have a static library where all global symbols need to be re-exported by the target executable.

What do you mean by “target executable”? In most cases executables don’t export symbols. That’s usually the preserve of a dynamic library (sometimes a bundle).

See An Apple Library Primer for an intro to the terminology I use for this stuff.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"