On Mon, Dec 21, 2009 at 4:52 PM, Elliott Slaughter <span dir="ltr"><<a href="mailto:elliottslaughter@gmail.com" target="_blank">elliottslaughter@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div></div><div>On Mon, Dec 21, 2009 at 1:26 PM, Luís Oliveira <span dir="ltr"><<a href="mailto:luismbo@gmail.com" target="_blank">luismbo@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Mon, Dec 21, 2009 at 8:55 PM, Elliott Slaughter<br>
<<a href="mailto:elliottslaughter@gmail.com" target="_blank">elliottslaughter@gmail.com</a>> wrote:<br>
> I'm believe I'm seeing this issue again, but none of my previous workarounds<br>
> seem to be working. I am using SBCL 1.0.29 on Windows XP, and when I save<br>
> and run an executable, I keep getting undefined alien errors. I have tried<br>
> both the :dont-save t hack that I initially suggested, and have tried<br>
> calling (close-foreign-library ...) on all of the open libraries before<br>
> saving the executable, and nothing helps.<br>
<br>
</div>Can you come up with a minimal test case? Something using e.g.<br>
libtest.dll would be nice.<font color="#888888"><font color="#000000"><br></font></font></blockquote></div><br></div></div>Sure.<div><br></div><div>For this test, I used SDL.dll from <a href="http://www.libsdl.org/release/SDL-1.2.14-win32.zip" target="_blank">http://www.libsdl.org/release/SDL-1.2.14-win32.zip</a> .</div>
<div><br></div><div><div>$ cat test.lisp</div><div>(asdf:oos 'asdf:load-op :cffi)</div><div>(cffi:define-foreign-library sdl</div><div> (:windows "SDL.dll"))</div><div>(cffi:use-foreign-library sdl)</div><div>
(cffi:defcfun ("SDL_Linked_Version" SDL-Linked-Version) :pointer)</div><div>(defun main () (format t "does it work?~%") (quit))</div><div>(cffi:close-foreign-library 'sdl)</div><div>(save-lisp-and-die #+windows "main.exe" #-windows "main"</div>
<div> :toplevel #'main :executable t)</div></div></blockquote><div><br></div><div>After what feels like beating my head against a wall for several hours, and getting contradictory results from various attempts to boils the failure down to a manageable size, I finally tried my original build recipe again, and it just worked. I'm not really sure what to say, other than that I'm really confused. I don't think the workarounds suggested by myself and others are necessary, so I think we can all forget about this, at least until this comes to haunt me again.</div>
<div><br></div><div>Sorry about the noise.</div><div> </div></div>-- <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<br>