Haha. I didn't notice that Elliot was the origin poster. Sorry about that Elliot. <div><br></div><div>/Luke<span></span><br><br>On Thursday, January 2, 2014, Luke Crook  wrote:<br><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><br><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>
</blockquote></div>