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-boun...@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 
<b...@openinworld.com<mailto:b...@openinworld.com>> wrote:

On Wed, Sep 14, 2016 at 4:21 PM, Blondeau Vincent
<vincent.blond...@worldline.com<mailto:vincent.blond...@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.!!!"

Reply via email to