I\'m working on a C++ framework, and there\'s a few issues when I compile it on OSX with Clang.
First of, I\'m using some other libraries, such as openssl, and clang
I don't recommend to enable global dynamic lookup:
-undefined dynamic_lookup
which will mark all undefined symbols as having to be looked up at runtime.
Much more safe way to resolve it for specific symbols:
-Wl,-U,symbol_name
, which only does so for the given symbol (note: you have to prepend an underscore to the symbol name)
You could also use weak dynamic linking:
extern int SayHello() __attribute__((weak));