Second, I create two binaries. I demonstrate that the first executable is broken by moving the original lib directory after compiling, while the second executable works fine.
$ ls *
break.lisp
bin:
lib:
SDL.dll
$ sbcl --load break.lisp
This is SBCL 1.0.29, an implementation of ANSI Common Lisp.
[ ... ]
It works
[undoing binding stack and other enclosing state... done]
[saving current Lisp image into main.exe:
writing 2888 bytes from the read-only space at 0x22000000
writing 1736 bytes from the static space at 0x22100000
writing 27582464 bytes from the dynamic space at 0x22300000
done]
$ mv main.exe bin/
$ cp lib/SDL.dll bin/
$ cd bin/
$ ./main.exe
This is experimental prerelease support for the Windows platform: use
at your own risk. "Your Kitten of Death awaits!"
It works
$ mv ../lib/ ../lib2
$ ./main.exe
This is experimental prerelease support for the Windows platform: use
at your own risk. "Your Kitten of Death awaits!"
debugger invoked on a SIMPLE-ERROR:
Error opening shared object "c:\\Users\\Elliott\\Programming\\CommonLisp\\brea
k-cffi\\lib\\SDL.dll":
126.
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE ] Skip this shared object and continue.
1: [RETRY ] Retry loading this shared object.
2: [CHANGE-PATHNAME] Specify a different pathname to load the shared object fr
om.
(SB-SYS:DLOPEN-OR-LOSE
#S(SB-ALIEN::SHARED-OBJECT
:PATHNAME #P"c:\\Users\\Elliott\\Programming\\CommonLisp\\break-cffi\\lib\\S
DL.dll"
:NAMESTRING "c:\\Users\\Elliott\\Programming\\CommonLisp\\break-cffi\\lib\\S
DL.dll"
:HANDLE NIL
:DONT-SAVE NIL))
0] (quit)
$ cd ..
$ mv lib2/ lib
$ cp lib/SDL.dll .
$ rm bin/main.exe
$ ls *
SDL.dll break.lisp
bin:
SDL.dll
lib:
SDL.dll
$ sbcl --load break.lisp
[ ... ]
It works
[undoing binding stack and other enclosing state... done]
[saving current Lisp image into main.exe:
writing 2888 bytes from the read-only space at 0x22000000
writing 1736 bytes from the static space at 0x22100000
writing 27578368 bytes from the dynamic space at 0x22300000
done]
$ mv main.exe bin/
$ cd bin/
$ ./main.exe
This is experimental prerelease support for the Windows platform: use
at your own risk. "Your Kitten of Death awaits!"
It works
$ mv ../lib/ ../lib2
$ ./main.exe
This is experimental prerelease support for the Windows platform: use
at your own risk. "Your Kitten of Death awaits!"
It works
--
Elliott Slaughter
"Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay