| View previous topic :: View next topic |
| Author |
Message |
Voblia
Joined: 21 Dec 2003 Posts: 3
|
Posted: Wed Feb 25, 2004 4:03 am Post subject: Console output from a DLL |
|
|
| Code: | (ct:defun-dll-export-c-function (ufo-control "UfoControl")
((x :short-bool)(y :single-float))
"void UfoControl(bool x, float y)"
(when x (format nil "~A~%" y))) |
throws me
| Code: | Warning: the following function(s) are called from forms
;;; in file "D:\home\qzma\dll_test\test_dll2.lisp" but were not defined:
;;; ASSEMBLER-X86::PUSH-SHORT-BOOL-LISP-ARG |
if i try doing
| Code: | | (COMPILE-DLL "D:\\home\\qzma\\dll_test\\test_dll2.lisp" :output-file "D:\\home\\qzma\\dll_test\\test_dll2.dll") |
And crashes the windows application that tries importing it.
The other problem is:
if i am changing the function into some simplier function like:
| Code: | (ct:defun-dll-export-c-function (ufo-control "UfoControl")
((y :single-float))
"void UfoControl(float y)"
(format nil "~A~%" y)
(force-output)) |
I am geting no output at all. |
|
| Back to top |
|
 |
mhs
Joined: 09 Mar 2004 Posts: 13 Location: Silicon Valley
|
Posted: Tue Mar 09, 2004 8:16 pm Post subject: Console output from a DLL |
|
|
Did you mean to write (format nil "~A~%" y)?
That will create and return a string. It won't write
anything to a stream.
That said, I don't know whether trying to write to the console
from a DLL will work. I tried it a while back and didn't succeed.
I ended up writing trace/debugging output to a file. I'd love to
find a solution.
- Mark Shirley |
|
| Back to top |
|
 |
|