sharplispers / cormanlisp

Corman Lisp
MIT License
570 stars 78 forks source link

Output to *standard-output* doesn't work in console executables created with SAVE-APPLICATION #10

Closed heegaiximephoomeeghahyaiseekh closed 9 years ago

heegaiximephoomeeghahyaiseekh commented 9 years ago

Try this at the REPL:

 (defun hello ()
     (format t "Hello, world!~%")
     (lisp-shutdown ""))

 (save-application "hello.exe" #'hello :console t)

The resulting hello.exe prints nothing when launched. However, the following program works fine:

(defun hello ()
    ;; Explicitly open the console.
    (with-open-file (*standard-output* "CON" :direction :output :if-exists :append)
        (format t "Hello, world!~%"))
    (lisp-shutdown ""))
ghost commented 9 years ago

For me, the two ways to use SAVE-APPLICATION, doesn't work at all (on Windows 7), I will try on XP SP3, Windows Vista, and 8.1

binghe commented 9 years ago

Based on recent mail discussions, the issue is not a bug of CormanLisp.

heegaiximephoomeeghahyaiseekh commented 9 years ago

WTF? So SAVE-APPLICATION isn't supposed to work?