I have written a "program":
(defun start-function () (print "hallo world"))
and created an executable:
D:\usr\lisp>clconsole
;; Corman Lisp 2.0 Copyright (c) 2002 Roger Corman. All rights reserved.
;; Unlicensed version: For evaluation and personal use only.
;; Some limitations apply.
Type :quit to exit.
?(load "d:\\usr\\lisp\\cormantest.lisp")
1
?(save-application "d:\\usr\\lisp\\test" #'start-function :static t :console
t)
;; Creating application d:\usr\lisp\test.exe
When I start this program, it crashes and nothing is printed.
What is wrong?
TIA,
Janos Blazi
-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
http://www.newsfeed.com The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----
On Thu, 12 Dec 2002 15:29:33 +0100, "Janos Blazi" <······@hotmail.com> wrote:
>I have written a "program":
>
>(defun start-function () (print "hallo world"))
>
>and created an executable:
>
... stuff deleted
>
>When I start this program, it crashes and nothing is printed.
>What is wrong?
A function is not quite an application. There are still a couple of issues you
have to deal with. Corman Lisp console applications don't automatically quit
when the main function ends, because the input is coming on a separate thread
(which will stay active). The program is not crashing, it is just awaiting more
input. If you type :quit is will terminate.
Here is a complete hello world application:
(defun start-function ()
(format t "Hello, world!~%")
(force-output)
(win:exitprocess 0))
For more info about console apps, look at the source to examples/touch.lisp,
which handles command line arguments, exceptions, etc.
Roger