[gambit-list] Problem with interactive development using remote REPL of iOS Sim.

Marc Feeley feeley at iro.umontreal.ca
Wed Feb 27 08:53:42 EST 2013

On 2013-02-27, at 4:03 AM, Tatsuya Tsuda <otabat at gmail.com> wrote:

> I can  create and load a loadable library with no errors. It seems that something is missing.
> Does anyone know how to solve this kind of problem?

Given that you are compiling with -arch i386, I'm assuming you are doing these experiments on the iPhone simulator.  If I remember correctly, on the actual device dynamic loading is not available.  So your strategy is fine for debugging with the iPhone simulator but not on a real iPhone.  What you'd need is a completely dynamic bridge to Objective-C.  That way you wouldn't have to compile the files you load.  Simply loading a source file (on the simulator or real iPhone) that uses the bridge would work.  I've done some work on a dynamic Objective-C bridge (based on objc_msgSend and friends) but it is not quite finished yet.

Now back to your problem.  I believe it is a linking problem at the Objective-C level.  It seems that the selector setText: in your app and the setText: in the dynamically loaded init.o1 are not the same selector.  There must be some linking flag that you didn't use when building your app which caused the executable to be stripped of its symbol table (selector table?).  I'm not an expert with the linking options for iOS but I hope this gives you an idea for what to look for.  Note that this problem would go away with a dynamic Objective-C bridge.


More information about the Gambit-list mailing list