OS X equivalent - unresolved-symbols = ignore-in-object-files

On Linux (CentOS), I sometimes used -Wl,--unresolved-symbols=ignore-in-object-filesto create a test application that depends only on parts of some object files, although a complete dependency will require the inclusion of more object files. The fact is that I know that when developing a test application, any unresolved characters never occur (otherwise it should just crash).

In OS X, I found similar options -Wl,-undefined,suppress (or warning, dynamic_lookup),-flat_namespacethat allowed me to create a binary file, but it did not work at runtime, complaining about dyld: Symbol not found: ..., even though the missing characters are never used at startup (the same application works fine for CentOS).

Is there anything else to get the application to start (until it works, if an unresolved character is detected), like on Linux?

+4
source share

Source: https://habr.com/ru/post/1664614/


All Articles