OK I succeeded in my task for a 32bit app using the advice provided.
However I am now trying to do the same with a 64bit application but
am at a loss.
For 32bit mode I used the -dynamic_lookup linker flag to access the
classes/objects
however this does not work for me in 64bit mode. I keep getting the
following
error when trying to inject a bundle that uses objects inside the main
application:
Error loading .../64bitApp.bundle/Contents/MacOS/64bitApp:
dlopen(../64bitApp/build/Debug/64bitApp.bundle/Contents/MacOS/
64bitApp, 265): Symbol not found: _OBJC_CLASS_$_xxxx
Referenced from:../64bitApp.bundle/Contents/MacOS/64bitApp
Expected in: flat namespace
in ../Debug/64bitApp.bundle/Contents/MacOS/64bitApp
If I do not reference an object in the main application the bundle
will inject fine.
All I am trying to do here is add a method to an existing object using
categories (which works
in 32bit mode). If I try doing this to a standard object it works (eg
NSString) The problem
seems to be with the applications custom objects.
I am stumped. Not sure what I need to do? Any help is appreciated.
Thanks
On 10 Sep 2009, at 21:29, Philippe Mougin wrote:
>
>