http://www.newlisp.org/downloads/newlisp_manual.html#link
Linking a source file with newLISP for a new executable
Source code and the newLISP executable can be linked together to build a self-contained application by using the -x command line flag.
;; uppercase.lsp - Link example (println (upper-case (main-args 1))) (exit)
The program uppercase.lsp takes the first word on the command-line and converts it to uppercase.
To build this program as a self-contained executable, follow these steps:
# on OSX, Linux and other UNIX newlisp -x uppercase.lsp uppercase chmod 755 uppercase # give executable permission # on Windows the target needs .exe extension newlisp -x uppercase.lsp uppercase.exe
newLISP will find a newLISP executable in the execution path of the environment and link a copy of the source code.
uppercase "convert me to uppercase"
The console should print:
CONVERT ME TO UPPERCASE
Note that neither one of the initialization files init.lsp nor .init.lsp is loaded during startup of linked programs.
'Programming' 카테고리의 다른 글
7 lines of code, 3 minutes: Implement a programming language from scratch (0) | 2012.09.25 |
---|---|
LispyScript (0) | 2012.09.24 |
newlisp A better Lisp-Scheme Fusion... Lambda the Ultimate (0) | 2012.09.23 |
Automatic Memory Management in newLISP (0) | 2012.09.22 |
(Racket) 문자열 개수 세기 (0) | 2012.09.20 |