Is there a way to detect if the code being compiled is in a Framework, a Bundle, or a Dynamic Library?
The reason is because of a crash reporter library that needs to know if a struct variable exists before taking the address of it..
IE:
#ifdef MH_EXECUTE_SYM
return (uint8_t*)&_mh_execute_header;
#else
return (uint8_t*)&_mh_dylib_header;
#endif
The problem is that MH_EXECUTE_SYM, MH_BUNDLE_SYM, MH_DYLIB_SYM is always defined for every kind of executable, bundle, framework..
So I need a way of determining which struct variable to take the address of.. Any ideas?