Hi David

On Feb 28, 2011, at 4:41 PM, David Chisnall wrote:

> Hi Mattieu,
> 
> Damien Pollet and I wrote a quick-and-dirty binding for GST a few years back 
> in an afternoon.  I'm not sure if he tidied it up - I got bored with it 
> because we now have a native Smalltalk implementation for Étoilé so 
> interfacing with a slower Smalltalk was less interesting to me, but I'd be 
> happy to help anyone wanting to work on the bridge.
> 


Cool I'd love to take a look at it any chance that you have it somewhere?


> To open frameworks, the best thing to do is use the NSBundle functionality - 
> this works on both GNUstep and OS X.  In LanguageKit, there is code for 
> loading a list of frameworks that is specified in a .plist file accompanying 
> a set of Smalltalk files - it's MIT licensed, so feel free to steal it.  If 
> copyright assignment is an issue, then I'd be happy for my GNUstep FSF 
> copyright assignment to cover this code, so I can commit anything that you 
> want to steal to GNUstep svn somewhere and you can then import it into other 
> GNU projects.
> 
> More comments inline...
> 
> 
> On 28 Feb 2011, at 15:16, Mathieu Suen wrote:
> 
>> Hi,
>> 
>> I am trying to write a gnustep/Etoile binding  for gnu-smalltalk.
>> I don't know if this ML is the right one so just let me know.
>> 
>> Here is the thing:
>> 
>> When writing the binding for Cocoa on OSX I can dynamically load framework 
>> with 
>> libtool:
>> 
>> lt_dlopenext ("Foundation.framework/Foundation");
> 
> You can just use dlopen() directly if you want to open the library, although 
> this may not register things with Foundation correctly.  The best way of 
> doing it is to provide the .framework path to [NSBundle bundleWithPath:].  
> 
> You can find a wrapper around this here:
> 
> http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Languages/LanguageKit/LKCompiler.m?revision=6793&view=markup
> 
> Look for the loadFramework() function - this loads a framework by name, and 
> works on OS X and GNUstep, searching for the framework in the standard 
> locations.


Thanks a lot for the infos I will take a look at it as soon as I can get 
gnustep runtime loaded.
...

> 
>> ...
>> 
>> I also need the Objective-C runtime for method like objc_getClass.
>> Currently when I load the objc library it load  /usr/lib/libobjc.so.2, I 
>> guess 
>> this is not the right one.
>> Using gdb it shows that the symbol does not exist.
> 
> This function is provided by the GNUstep Objective-C runtime, by the 
> ObjectiveC2 compatibility framework in GNUstep Base, and by the GCC 
> Objective-C runtime shipped with 4.6.
> 
> libobjc.so.2 looks like you are using a very old version of the GCC 
> Objective-C runtime, so this function should be being provided by GNUstep 
> base, unless you are using a version more than a year old.
> 


It what I suspected using objdump I can't recognize the Objective-C API so I 
guess that was the one from gcc.
Now I am wondering how to load the gnustep library. At least what is the 
minimum that I need in other to have NSBundle and friends to work.

I have a quick look at my gnustep install dir. From what I see the gnustep base 
is somewhere in /usr/GNUstep/Local/.../libgnustep-base.so

I am using the build tool from gst. So what should I add to my Makefile.am and 
configure.ac.
Adding:

include ${GNUSTEP_MAKEFILES}/common.make

Is a bit too mush since I already have all make and install rules.
I might only need -L/... and -lgnustep-base switch I guess.

Thanks a lot

> David
> 
> -- Sent from my IBM 1620
> _______________________________________________
> Etoile-discuss mailing list
> [email protected]
> https://mail.gna.org/listinfo/etoile-discuss

--
Mathieu Suen

__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible 
contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail 

_______________________________________________
Etoile-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-discuss

Répondre à