Hi,

 

I implemented the FFILibrary way in the latest dev version.

 

Maybe you have to modify the code to point to your library (see RLibrary methods).

 

Don���t hesitate to commit your code, the project is open.

 

Thanks,

 

Cheers,

Vincent

 

 

De : Pharo-users [mailto:pharo-users-bounces@lists.pharo.org] De la part de Esteban Lorenzano
Envoy�� : mercredi 14 septembre 2016 14:23
�� : Any question about pharo is welcome
Objet : Re: [Pharo-users] [Pharo-dev] [ANN] RProjectConnector V2.1

 

Hi,

 

On 14 Sep 2016, at 12:19, Ben Coman <btc@openInWorld.com> wrote:

 

On Wed, Sep 14, 2016 at 4:21 PM, Blondeau Vincent
<
vincent.blondeau@worldline.com> wrote:




I try to move the R dll close to my Pharo VM and also inside the
Plugins directory but without success ...


It should be at the same location that libcairo.2.dylib


Is there a way to say where are the R dll instead of copying them ?


Are you using the system to do the library path resolution? Or finding the
library file in Pharo and then passing an absolute path to FFI?

 

no, it doesn���t��� you need to pass a path to the library (e.g. '/opt/local/lib/libR.so���)




I think that the system that do the resolution:
I defined in a trait:
ffiLibraryName
        ^ #R
And the library is named R.dll (under windows).

Maybe I should do like CairoLibrary?



My limited understanding is that #ffiLibraryName should return a class
rather than a symbol. Thus...

MyClass class >> ffiLibraryName
         ^ R

R >> win32ModuleName
          ^ 'libr.N.dll'.   "or whatever is the actual dll filename���

 

well��� it can answer a class (a child of FFILibrary, like LibC)

or a String with a fixed path: ���libr.N.dll���

 

of course, 2nd way is limited because you hardcode the library path :S

 

cheers,

Esteban

 





cheers -ben

 


!!!*************************************************************************************
"Ce message et les pi��ces jointes sont confidentiels et r��serv��s �� l'usage exclusif de ses destinataires. Il peut ��galement ��tre prot��g�� par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir imm��diatement l'exp��diteur et de le d��truire. L'int��grit�� du message ne pouvant ��tre assur��e sur Internet, la responsabilit�� de Worldline ne pourra ��tre recherch��e quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'exp��diteur ne donne aucune garantie �� cet ��gard et sa responsabilit�� ne saurait ��tre recherch��e pour tout dommage r��sultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.!!!"