<br><br><div class="gmail_quote">On Sun, May 3, 2009 at 5:44 PM, Andreas Raab <span dir="ltr">&lt;<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Mariano Martinez Peck wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Andreas: Thanks for the replies. I did all of what you told me but I got this error when trying to call the api:<br>
<br>
&#39;External library is invalid&#39;<br>
</blockquote>
<br></div>
I think this means the name is wrong. Try using #forceLoading before you call any functions - this will help you to find out whether there is anything wrong with the name.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I even try to execute: ExternalLibrary initialize.<br>
<br>
However, I am not convinced why this way is better than having module: aString.<br>
</blockquote>
<br></div>
It&#39;s not. That&#39;s why the alternatives exists. But if you have to provide a more flexible way of deciding which library to use there is really not much of an alternative.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Disadvantages of this new way:<br>
<br>
- I am &quot;coupling&quot; or &quot;hardcoding&quot; not only the library name but also the location in the file system. Perhaps I rather this be automatically done by FFI.<br>
</blockquote>
<br></div>
The FFI does some of this (using the default system search paths etc) and to the extent the FFI does it, you can use it from ExternalLibrary. In other words, you don&#39;t *have to* provide a full path, but you can.<div class="im">
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Advantages of this new way:<br>
<br>
- I can add as many names or paths as I want to my library.<br>
<br>
what do you think? can you help me with the advantages and disadvantages from both alternatives?<br>
</blockquote>
<br></div>
The rule of thumb should be that unless you have to switch between library names dynamically, you should be using the simple module: modifier in FFI calls. Only if this isn&#39;t sufficient for specifying the name you should be thinking about ExternalLibrary.</blockquote>
<div><br>Ok. Now I get it. I think that in my situation is better to have module: aString.<br><br>Thanks for the comments!<br><br>Mariano<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Cheers,<br><font color="#888888">
  - Andreas<br>
<br>
</font></blockquote></div><br>