<div dir="ltr">On Thu, Jan 2, 2014 at 1:46 PM, Luke Crook <span dir="ltr"><<a href="mailto:luke@balooga.com" target="_blank">luke@balooga.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I don't think that this is such a burden. This is how libs are loaded in lisp builder-sdl. <span></span><div><br></div><div><br></div><div><table style="border-collapse:collapse"><tbody style="padding:0px;margin:0px"><tr style="padding:0px;margin:0px">

<td style="padding:0px 0px 0px 4px;margin:0px;white-space:pre-wrap;vertical-align:top"><font><span style="white-space:normal;background-color:rgba(255,255,255,0)"><span>(</span><span>cffi</span><span>:</span><span>define</span><span>-foreign-library sdl<br>

</span></span></font></td></tr><tr style="padding:0px;margin:0px"><td style="padding:0px 0px 0px 4px;margin:0px;white-space:pre-wrap;vertical-align:top"><font><span style="white-space:normal;background-color:rgba(255,255,255,0)"><span>  </span><span>(</span><span>:</span><span>darwin </span><span>(</span><span>:</span><span>or </span><span>(</span><span>:</span><span>framework </span><span>"SDL"</span><span>)</span><span><br>

</span></span></font></td></tr><tr style="padding:0px;margin:0px"><td style="padding:0px 0px 0px 4px;margin:0px;white-space:pre-wrap;vertical-align:top"><font><span style="white-space:normal;background-color:rgba(255,255,255,0)"><span>                </span><span>(</span><span>:</span><span>default </span><span>"libSDL"</span><span>)))</span><span><br>

</span></span></font></td></tr><tr style="padding:0px;margin:0px"><td style="padding:0px 0px 0px 4px;margin:0px;white-space:pre-wrap;vertical-align:top"><font><span style="white-space:normal;background-color:rgba(255,255,255,0)"><span>  </span><span>(</span><span>:</span><span>windows </span><span>"SDL.dll"</span><span>)</span><span><br>

</span></span></font></td></tr><tr style="padding:0px;margin:0px"><td style="padding:0px 0px 0px 4px;margin:0px;white-space:pre-wrap;vertical-align:top"><font><span style="white-space:normal;background-color:rgba(255,255,255,0)"><span>  </span><span>(</span><span>:</span><span>unix </span><span>(</span><span>:</span><span>or </span><span>"libSDL-1.2.so.0.7.2"</span><span><br>

</span></span></font></td></tr><tr style="padding:0px;margin:0px"><td style="padding:0px 0px 0px 4px;margin:0px;white-space:pre-wrap;vertical-align:top"><font><span style="white-space:normal;background-color:rgba(255,255,255,0)"><span>              </span><span>"libSDL-1.2.so.0"</span><span><br>

</span></span></font></td></tr><tr style="padding:0px;margin:0px"><td style="padding:0px 0px 0px 4px;margin:0px;white-space:pre-wrap;vertical-align:top"><font><span style="white-space:normal;background-color:rgba(255,255,255,0)"><span>              </span><span>"<a href="http://libSDL-1.2.so" target="_blank">libSDL-1.2.so</a>"</span><span><br>

</span></span></font></td></tr><tr style="padding:0px;margin:0px"><td style="padding:0px 0px 0px 4px;margin:0px;white-space:pre-wrap;vertical-align:top"><font><span style="white-space:normal;background-color:rgba(255,255,255,0)"><span>              </span><span>"libSDL.so"</span><span><br>

</span></span></font></td></tr><tr style="padding:0px;margin:0px"><td style="padding:0px 0px 0px 4px;margin:0px;white-space:pre-wrap;vertical-align:top"><font><span style="white-space:normal;background-color:rgba(255,255,255,0)"><span>              </span><span>"libSDL"</span><span>)))</span><span><br>

</span></span></font></td></tr><tr style="padding:0px;margin:0px"></tr></tbody></table></div></blockquote><div><br></div><div>Yeah, we can keep doing that, but I did get some complaints recently from users who found a new libpng version we hadn't accounted for. And Windows has no tradition of maintaining multiple names for the same library, so we can't just assume it'll exist under the name "libpng.dll". I guess if we stick to our current system we'll just have to push patches every time a new libpng version is released.<br>
</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div class="h5"><br>On Tuesday, December 31, 2013, Luís Oliveira  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

On Tue, Dec 31, 2013 at 6:58 PM, Elliott Slaughter<br>
<<a>elliottslaughter@gmail.com</a>> wrote:<br>
> with the comment "the define-foreign-library clause (t (:default "libcurl"))<br>
> [...] will adapt to various operating systems".<br>
><br>
> I'm wondering exactly how smart is this automatic handling?<br>
<br>
Right now, it simply appends an extension like ".dll" or ".dylib". It<br>
doesn't handle versions or anything like that.<br>
<br>
<br>
> On Windows, for example, the conventions are not always followed so closely,<br>
> and as a result I keep adding more special cases to my<br>
> define-foreign-library clauses when users complain they can't load the<br>
> libraries.<br>
><br>
> For example, libpng might be png.dll or libpng.dll or libpng12.dll or<br>
> libpng12-0.dll or libpng15-15.dll.<br>
><br>
> Will I be required to maintain a list of all possible names for the rest of<br>
> eternity or is there some better way to manage this situation?<br>
<br>
Yeah, that sucks. I'm not aware of a better general solution. In some<br>
cases, you might get away with searching for "*png*.dll" then loading<br>
that using load-foreign-library, but I suppose you need to be careful<br>
where you search.<br>
<br>
HTH,<br>
<br>
--<br>
Luís Oliveira<br>
<a href="http://kerno.org/~luis/" target="_blank">http://kerno.org/~luis/</a><br>
<br>
</blockquote></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Elliott Slaughter<br><br>"Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay
</div></div>