<br><br><div><span class="gmail_quote">2006/3/2, Dave Hylands &lt;<a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a>&gt;:</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;">&gt;&nbsp;&nbsp;I'm&nbsp;&nbsp;squeak newbie and I want to use a C DLL with FFI on Linux (I use the<br>
&gt; The Ubuntu Linux distribution).<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I have a function test which is written in a Linux C DLL. It works when<br>&gt; I call it from an exe.<br>&gt;&nbsp;&nbsp;When I call it from my class I obtain the error message : &quot;Error: unable to
<br>&gt; find function address&quot;<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)&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; ---------------------------------------------------------------------
<br>&gt;&nbsp;&nbsp;TestClass&gt;&gt;testLinux<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cdecl: void 'test' (void) module: 'test.so'&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^self externalCallFailed<br>&gt; ---------------------------------------------------------------------<br>
&gt;<br>&gt;&nbsp;&nbsp;I use FFI with windows for an C Windows DLL and it works correctly,&nbsp;&nbsp;so is<br>&gt; 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 &quot;apicall&quot; instead of &quot;cdecl&quot; and just put my dll in the same directory than squeak.<br>
</div><div>___________________________________<br>
say: aString<br>
&lt;apicall: long '?play@@YAXPAD@Z' (char *) module:'Acces.dll'&gt;<br>
&nbsp;&nbsp;&nbsp; ^self externalCallFailed<br>
&nbsp;___________________________________</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>