<br><br><div><span class="gmail_quote">2006/3/2, Dave Hylands <<a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Vincent,</blockquote><div><br>
Hi Dave <br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> I'm squeak newbie and I want to use a C DLL with FFI on Linux (I use the<br>
> The Ubuntu Linux distribution).<br>><br>> I have a function test which is written in a Linux C DLL. It works when<br>> I call it from an exe.<br>> When I call it from my class I obtain the error message : "Error: unable to
<br>> find function address"<br><br>Just an off the wall guess, but is the diretory containing test.so<br>included in the environment variable LD_LIBRARY_:PATH?</blockquote><div><br>
no, I test this and .... same problem, but when I put test.so in my
home directory it's work... thanks, it's the good idea. (I'm really not
accustomed to linux) </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> ---------------------------------------------------------------------
<br>> TestClass>>testLinux<br>> <cdecl: void 'test' (void) module: 'test.so'><br>> ^self externalCallFailed<br>> ---------------------------------------------------------------------<br>
><br>> I use FFI with windows for an C Windows DLL and it works correctly, so is<br>> the FFI package works with Linux / Ubuntu ?<br><br>I'd be very interested to see your example. I'd like to interface i2c<br>
to Squeak and to do so I would like to make some wrapper functions<br>available (the wrapper functions all eventually call ioctl, but that<br>doesn't seem to be availble to Squeak either).</blockquote><div><br>
I use "apicall" instead of "cdecl" and just put my dll in the same directory than squeak.<br>
</div><div>___________________________________<br>
say: aString<br>
<apicall: long '?play@@YAXPAD@Z' (char *) module:'Acces.dll'><br>
^self externalCallFailed<br>
___________________________________</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">--<br>Dave Hylands<br>Vancouver, BC, Canada<br>
<a href="http://www.DaveHylands.com/">http://www.DaveHylands.com/</a><br><br></blockquote></div><br>